home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / com_and2.zip / CASCRIPT.DOC < prev    next >
Text File  |  1990-10-16  |  262KB  |  8,580 lines

  1. COM-AND: IBM PC Communication Script Language
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.           ------------------------------------------
  18.           COM-AND:    Communications Script Language
  19.                  for the IBM PC
  20.           ------------------------------------------
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.     COM-AND is distributed freely and may be copied by anyone for
  33.     any number of machines, for purposes of evaluation.  The author
  34.     offers COM-AND and its accessory programs as a package, as
  35.     "shareware".  If you USE the program a registration of $35.00 is
  36.     required.  The author may be reached:
  37.  
  38.  
  39.                  CABER Software
  40.                  R. (Scott) McGinnis
  41.                  P.O. Box 3607 Mdse Mart
  42.                  Chicago, IL 60654-0607
  43.  
  44.                  PLINK, GEnie id: TARTAN
  45.                  CIS id: 73147,2665
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. Version 2.7: 901015
  55.  
  56. COM-AND: IBM PC Communication Script Language
  57.  
  58.  
  59.  
  60.  
  61.  
  62.     COM-AND version 2.7 is copyright 1990 CABER Software (R. Scott
  63.     McGinnis).  All rights are reserved world wide, excepting redistri-
  64.     bution under the ShareWare concept.  COM-AND is distributed freely
  65.     and may be copied by anyone for any number of machines, under the
  66.     ShareWare concept.
  67.  
  68.  
  69.     COM-AND is distributed as ShareWare.  You may use COM-AND without
  70.     charge for the purposes of evaluating its usefulness to you.  It is
  71.     suggested that this evaluation period be limited to a few days of
  72.     actual use.  If you find COM-AND to be worth continued use, then you
  73.     are asked to pay for it.  The payment is called a "registration
  74.     fee".  Complete the included registration form and mail it with your
  75.     payment.
  76.  
  77.  
  78.     Registration of COM-AND includes all published accessory programs
  79.     (which currently are PC-VCO, CCHESS, CBRIDGE, and CCOLOR), and
  80.     several utilities (unPACKIT and unSTUFIT).  Accessories and utili-
  81.     ties are published separately.    One registration covers the use
  82.     of any and all of these programs.
  83.  
  84.  
  85.     By registering your copy of COM-AND (or any ShareWare product), you
  86.     are promoting and supporting the convenient distribution method and
  87.     free evaluation policy that brought you this copy of COM-AND.
  88.  
  89.  
  90.     If you have received this copy from a Users' Group, "Software
  91.     Library" or "SIG", and have paid a small fee (usually $3 to $10),
  92.     you have NOT acquired a registration or continued right to use
  93.     COM-AND.  This fee was for the convenience of obtaining the diskette
  94.     with COM-AND on it.  The fee does NOT apply to the registration fee.
  95.  
  96.  
  97.     You may NOT distribute COM-AND or its documentation in connection
  98.     with ANY commercial venture, product, publication or service without
  99.     written approval.  COM-AND may not be disassembled or modified
  100.     without express written consent of its author.
  101.  
  102.  
  103.     COM-AND is supplied "as-is" with no warranties expressed or implied.
  104.     Neither CABER Software nor the author will be liable for any damages
  105.     or lost revenues incurred through the use of this program or any of
  106.     its accessories and utilities beyond the registration price paid.
  107.  
  108.  
  109. Version 2.7: 901015
  110.  
  111. COM-AND: IBM PC Communication Script Language
  112.  
  113.  
  114.  
  115.  
  116.  
  117.     COM-AND version 2.7 is available as shareware through PLINK, GEnie,
  118.     UNISON, NWI, Delphi and CIS.  COM-AND is also available through many
  119.     Bulletin Board systems.  Individuals are welcome to download COM-AND
  120.     for purposes of evaluation.
  121.  
  122.  
  123.     Commercial users of COM-AND must register COM-AND with the author or
  124.     one of the individuals listed here.  Site licenses (multiple copy
  125.     registrations) are available from:
  126.  
  127.  
  128.         CABER Software
  129.         R. (Scott) McGinnis
  130.         P.O. Box 3607 Mdse Mart
  131.         Chicago, IL 60654-0607
  132.  
  133.         PLINK, GEnie, Delphi ID: TARTAN
  134.         CIS id: 73147,2665
  135.  
  136.  
  137.     Commercial users of COM-AND may register it with the author above or
  138.     through:
  139.  
  140.  
  141.         SupportWare
  142.         Mike Todd
  143.         P.O. Box 14927
  144.         Long Beach, CA 90803-1449
  145.         (213) 439-6104
  146.  
  147.  
  148.     In Japan, COM-AND may be downloaded as shareware from PC-VAN.
  149.     COM-AND is available in Japan as a commercial product tailored for
  150.     specific machines through:
  151.  
  152.  
  153.         Discotel Japan (Ciari Soft)
  154.         Kurakuen 3 ban-cho 2-50
  155.         Nishinomiya 662
  156.         Japan
  157.  
  158.         Contact: Claude Ciari
  159.         Tel (0798)73-0052
  160.         PC-VAN NEC by Ciari
  161.         ID: CCIARI
  162.  
  163.  
  164. Version 2.7: 901015
  165.  
  166. COM-AND: IBM PC Communication Script Language
  167.  
  168.  
  169.                  Table of Contents
  170.                  -----------------
  171.  
  172. I.    COM-AND Introduction  ...................................... page 1
  173. II.    Script Introduction  ....................................... page 2
  174. III.    Definitions  ............................................... page 4
  175.  
  176.     A. Comments ................................................ page 4
  177.     B. Labels .................................................. page 4
  178.     C. Keywords ................................................ page 5
  179.     D. Commands ................................................ page 5
  180.     E. Strings ................................................. page 6
  181.     F. Numerics ................................................ page 7
  182.     G. States .................................................. page 8
  183.  
  184. IV.    Syntax    .................................................... page 9
  185. V.    Script Language Commands ................................... page 11
  186.  
  187.     Commands beginning "A"...................................... page 11
  188.     Commands beginning "B"...................................... page 14
  189.     Commands beginning "C"...................................... page 15
  190.     Commands beginning "D"...................................... page 20
  191.     Commands beginning "E"...................................... page 26
  192.     Commands beginning "F"...................................... page 29
  193.     Commands beginning "G"...................................... page 39
  194.     Commands beginning "H"...................................... page 43
  195.     Commands beginning "I"...................................... page 44
  196.     Commands beginning "J"...................................... page --
  197.     Commands beginning "K"...................................... page 52
  198.     Commands beginning "L"...................................... page 52
  199.     Commands beginning "M"...................................... page 54
  200.     Commands beginning "N"...................................... page 58
  201.     Commands beginning "O"...................................... page 59
  202.     Commands beginning "P"...................................... page 61
  203.     Commands beginning "Q"...................................... page 62
  204.     Commands beginning "R"...................................... page 63
  205.     Commands beginning "S"...................................... page 66
  206.     Commands beginning "T"...................................... page 76
  207.     Commands beginning "U"...................................... page 78
  208.     Commands beginning "V"...................................... page 78
  209.     Commands beginning "W"...................................... page 79
  210.     Commands beginning "X"...................................... page --
  211.     Commands beginning "Y"...................................... page --
  212.     Commands beginning "Z"...................................... page --
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. Version 2.7: 901015
  220.  
  221. COM-AND: IBM PC Communication Script Language
  222.  
  223.  
  224.                  Table of Contents
  225.                  -----------------
  226.  
  227. VI.    SET Commands  .............................................. page 84
  228.  
  229.     A. Basic set ............................................... page 84
  230.     B. SET ASCII ............................................... page 98
  231.     C. SET KERMIT .............................................. page 99
  232.     D. SET ZMODEM .............................................. page 101
  233.  
  234. VII.    String Intrinsics  ......................................... page 102
  235. VIII.    Script Errors .............................................. page 106
  236. IX.    ASPECT and PROCOMM 2.4.2 scripts ........................... page 107
  237. X.    Program Requirements ....................................... page 109
  238. XI.    Program and Author Information    ............................ page 110
  239.  
  240.  
  241.                 Appendices
  242.                 ----------
  243.  
  244. A.    Sample scripts    ............................................ page 111
  245. B.    Host and BBS scripts  ...................................... page 114
  246. C.    External Protocol Drivers  ................................. page 115
  247. D.    Encoded Music  ............................................. page 117
  248. E.    File transfer error numbers  ............................... page 120
  249. F.    EBL  ....................................................... page 122
  250. G.    Manual setting and scripts ................................. page 123
  251.  
  252.     1. Alt-S (Setup window) .................................... page 123
  253.     2. Alt-O (Options window) .................................. page 124
  254.     3. Alt-P (Parameters window) ............................... page 125
  255.     4. Alt-K (KERMIT defaults window) .......................... page 125
  256.     5. Alt-J (Colors window) ................................... page 126
  257.     6. Help (General Help list) ................................ page 126
  258.  
  259. H.    STACK and Macro keycodes  .................................. page 128
  260. I.    Dynamic string variables ................................... page 129
  261. J.    Flow control methods ....................................... page 131
  262. K.    Machine language subroutines ............................... page 133
  263. L.    CACMP ...................................................... page 136
  264. M.    Script Language (version 1.x) .............................. page 137
  265. N.    Language Summary ........................................... page 140
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274. Version 2.7: 901015
  275.  
  276. COM-AND: IBM PC Communication Script Language                 Page   1
  277.  
  278.  
  279. I.    COM-AND Introduction
  280.  
  281.  
  282.     COM-AND for the IBM PC and compatibles is a communications program
  283.     that may be used by itself, or with several integrated accessory
  284.     programs (which themselves may be used independent of COM-AND).
  285.     COM-AND provides standard comm program functions:  a dialing
  286.     directory, macros, disk logging, binary and ASCII file transfers,
  287.     and most particularly: scripted execution.
  288.  
  289.  
  290.     COM-AND Version 2.7 executes as a CRT based comm program either in 25
  291.     line text mode on a CGA or monochrome screen, or 25/43 line mode on
  292.     an EGA display.  When an accessory is loaded through COM-AND (or when
  293.     COM-AND is loaded by an accessory), most of the functions of COM-AND
  294.     are available through the accessory.
  295.  
  296.  
  297.     COM-AND and its accessories (PC-VCO, CCHESS, CBRIDG, and CCOLOR) may
  298.     be copied freely and distributed to anyone for any number of
  299.     machines.  The author offers COM-AND as "shareware".  If the program
  300.     is used after a reasonable period of evaluation, a registration of
  301.     $35.00 is asked for the entire package.
  302.  
  303.  
  304.     COM-AND provides a script language for automation of certain tasks.
  305.     COM-AND is distributed with a KERMIT server, a HOST mode, a Bulletin
  306.     board, a file manager, and a LEARN MODE... all as scripts.  Scripts
  307.     may be written for COM-AND by anyone, requiring only an editor that
  308.     produces ASCII files.  COM-AND will execute scripts written for the
  309.     very popular PROCOMM communication program as well.
  310.  
  311.  
  312.     This document discusses scripted execution, and the COM-AND Script
  313.     Language.  The script language has grown over the years to the point
  314.     where its documentation requires a separate manual.  For manual use
  315.     of COM-AND, and functional overview, the reader is refered to the
  316.     document COM-AND.DOC.
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329. Version 2.7: 901015
  330.  
  331. COM-AND: IBM PC Communication Script Language                 Page   2
  332.  
  333.  
  334. II.    Script Introduction
  335.  
  336.  
  337.     A script facility allows certain manual tasks to be automated, and
  338.     COM-AND to run unattended (if you have tested the script !!!).
  339.     Scripting is invoked in several ways:
  340.  
  341.     o    at load time:
  342.  
  343.         . COM-AND.CMD, if present in the current directory or the
  344.           subdirectory indicated by the 'COM-AND=' environment
  345.           variable, is executed immediately;
  346.  
  347.         . the /F switch in the run command may specify a script to
  348.           be executed immediately (after COM-AND.CMD, if present);
  349.  
  350.     o    interactively (through F2) as a script
  351.  
  352.     o    interactively (through F1) as an accessory or part of one
  353.  
  354.     o    a script may be attached to a dialing directory entry, to
  355.         be executed upon successful connection
  356.  
  357.  
  358.     Script commands are read by COM-AND from an ASCII file (word
  359.     processor files are not usually ASCII files!).    Programmer's text
  360.     editors and EDLIN (provided with DOS) may be used to create and
  361.     modify a script file.  If you wish to use a word processor to update
  362.     a script, first ensure that the particular word processor will output
  363.     an ASCII file (often called non-document format, perhaps even called
  364.     ASCII).
  365.  
  366.  
  367.     Once a script begins, execution of COM-AND is automatic, driven by
  368.     the script.  However, the ESC key may be used to terminate the
  369.     script at most any time (depending on the script.  The script author
  370.     might make ESC unusable).  During dialing, two ESCs are needed...
  371.     one to terminate the dial function, and the second to end script.
  372.  
  373.  
  374.     Generally speaking, a script usually takes the form:
  375.  
  376.         <perform some action>
  377.         <wait for an identifiable response>
  378.         <perform some action...
  379.         ... and so on
  380.  
  381.  
  382.  
  383.  
  384. Version 2.7: 901015
  385.  
  386. COM-AND: IBM PC Communication Script Language                 Page   3
  387.  
  388.  
  389. II.    Script Introduction (continued)
  390.  
  391.  
  392.     For example, a script might dial a number listed in the dialing
  393.     directory and wait for the "ID = " response from the dialed host.
  394.     The next action would be to send the logon ID, with a carriage
  395.     return and await a prompt for a password.
  396.  
  397.  
  398.     The scripts included with COM-AND are examples of such simple
  399.     scripts.  However:  the COM-AND script language is not limited to
  400.     communications related tasks...  programs may be loaded and passed
  401.     parameters, screen windows may be opened and scrolled, and so on.
  402.     A nontrivial BBS has been written using COM-AND's scripting, and is
  403.     provided with the distribution for the interested (and wary)!
  404.  
  405.  
  406.     It is taken for granted that the script programmer is acquainted with
  407.     the computer and telecommunications environment in general, and the
  408.     COM-AND program in particular.    Much of the script language facility
  409.     revolves around making the features of COM-AND available to the
  410.     programmer.  After that, the remainder of the language makes the
  411.     computer (e.g.    read and write files), and the communications line
  412.     (e.g.  read and write lines of text) available to the programmer.
  413.  
  414.  
  415.     Details of the features of COM-AND are discussed in the COM-AND.DOC
  416.     document.  Much of the discussion to follow assumes familiarity with
  417.     that document.
  418.  
  419.  
  420.     The next few pages define terms used in discussing scripts and script
  421.     language elements.  Notational symbols will then be defined.  After
  422.     that, script language elements will be presented in detail.  Appendix
  423.     I summarizes the version 1.x script language.  Appendix J summarizes
  424.     the version 2 and 3.x languages.  Sample scripts are presented in
  425.     Appendix A.
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439. Version 2.7: 901015
  440.  
  441. COM-AND: IBM PC Communication Script Language                 Page   4
  442.  
  443.  
  444. III.    Definitions
  445.  
  446.  
  447.     A. Comments:
  448.  
  449.        Comments may be used (and are highly recommended!) alone on a
  450.        line, on a command line (after the command) or on a label line
  451.        (after the label).  A comment begins with a semi-colon or asterisk
  452.        and extends to the end of the line.
  453.  
  454.        Blank lines are also treated as comments, for phrasing.  Top-of-
  455.        form, appearing in the first column, is treated as a comment.
  456.  
  457.  
  458.     B. Labels:
  459.  
  460.        Labels are character strings terminated with a colon, not
  461.        including the characters:  blank, comma(,), exclamation (!),
  462.        number sign (#), dollar sign ($), percent sign (%), ampersand (&),
  463.        apostrophe ('), double quote ("), left and right parenthesis,
  464.        asterisk (*), plus (+), hyphen (-, minus), right slash (/), and
  465.        semi-colon(;).
  466.  
  467.        Only the first 8 characters of the label are significant to the
  468.        script processor; if two labels match for the first 8 characters,
  469.        the one closest to the beginning of the script will be used, and
  470.        the second ignored.
  471.  
  472.        Case is not significant in labels.
  473.  
  474.        Comments are allowed on a line with a label (comments begin with
  475.        semi-colon or asterisk and extending to the end of the line).
  476.  
  477.        Commands are not allowed on a line with a label.
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494. Version 2.7: 901015
  495.  
  496. COM-AND: IBM PC Communication Script Language                 Page   5
  497.  
  498.  
  499. III.    Definitions (continued)
  500.  
  501.  
  502.     C. Keywords:
  503.  
  504.        Keywords are alphanumeric character strings terminated by a blank,
  505.        a comma, a left parenthesis, or a semi-colon.  Only the first 4
  506.        characters of the keyword are significant to the script processor
  507.        (where keywords are the same for the first 4 letters, the last
  508.        letter is used to distinguish them).
  509.  
  510.  
  511.        Case is not significant in keywords.
  512.  
  513.  
  514.     D. Commands:
  515.  
  516.        Commands are structured:  <keyword> followed by arguments (if
  517.        any).  Delimiters between command arguments are blank and comma.
  518.        Each command is a line by itself (with the exception of the IF
  519.        statement which may contain a second command).  Comments are
  520.        allowed after the command (comments begin with semi-colon or
  521.        asterisk and extend to the end of the line).
  522.  
  523.  
  524.        COM-AND implements a stack for GOSUB, IF, SWITCH, FOR, DO and
  525.        WHILE commands.  This allows these commands to be nested to 20
  526.        levels.  A 'stack overflow' message is issued when nesting of more
  527.        than 20 is attempted.  A 'stack underflow' message is issued when
  528.        a RETURN is encountered for which no corresponding GOSUB was
  529.        issued.
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549. Version 2.7: 901015
  550.  
  551. COM-AND: IBM PC Communication Script Language                 Page   6
  552.  
  553.  
  554. III.    Definitions (continued)
  555.  
  556.  
  557.     E. Strings:
  558.  
  559.        String arguments are of two kinds:  literal and variable.  Literal
  560.        strings are enclosed in double quotes (").  The accent grave (`)
  561.        is used in a literal string to force the next character (e.g. the
  562.        string "`"" is a literal consisting of a double quote by itself).
  563.  
  564.  
  565.        String variables are refered to as S0, S1, ...  S29.  Each string
  566.        variable is 80 characters wide, and may be set with the Sx=,
  567.        ASSIGN, GET, and RGET statements.  They are set to blank when the
  568.        script begins (but are not reset to blanks when EXECUTE or FCALL
  569.        moves the script processor to a new script file).
  570.  
  571.  
  572.        Strings are manipulated internally exactly as given.  However,
  573.        when issued (to the console or out the comm port, or in some cases
  574.        to disk), or used in WHEN string, certain edits are performed:
  575.  
  576.        o       Trailing blanks are trimmed
  577.        o       "!" by itself (except "!!") is translated into a
  578.            carriage return
  579.        o       "^x" (except ^^) where 'x' is character "@" through "`"
  580.            is translated into the corresponding control character
  581.        o       Certain strings are treated as "intrinsic"s.  Refer
  582.            to chapter VII of this document for further discussion.
  583.  
  584.        Refer below to the "Sx = <expression>" discussion on page 76 for
  585.        details on string expressions.
  586.  
  587.  
  588.        Another set of string variables may be dynamically allocated by a
  589.        script (or scripts).  These variables are refered to as V0, V1,
  590.        ...    Vx, where 'x' is determined by the allocating script.
  591.        Dynamic string variables may be used anywhere static variables are
  592.        used, AFTER A SCRIPT ALLOCATES THEM.  Refer to appendix 'I' for a
  593.        discussion of these variables and their use.
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604. Version 2.7: 901015
  605.  
  606. COM-AND: IBM PC Communication Script Language                 Page   7
  607.  
  608.  
  609. III.    Definitions (continued)
  610.  
  611.  
  612.     F. Numerics:
  613.  
  614.        Numeric arguments are of two kinds:    literal and variable.  Lit-
  615.        eral numerics are values alone or within double quotes, or as a
  616.        string within a string variable.  Decimal values with the range
  617.        -32,768 to 32,767 are supported.  Hexadecimal values may be
  618.        specified using the 'C' convention (e.g.  0xffff is -1).
  619.  
  620.  
  621.        Numeric variables are refered to as N0, N1, ...  N99.  Each
  622.        numeric variable is capable of storing the value -32,768 to
  623.        32,767.  They are set to zero when the script begins (but are not
  624.        reset to zeroes when an EXECUTE or FCALL statement moves the
  625.        script processor to a new script file).
  626.  
  627.  
  628.        Refer below to the "Nx = <expression>" discussion on page 58 for
  629.        details on numeric expressions.  Numeric expressions are allowed
  630.        in place of single numeric values (where a value is required) in
  631.        all commands except:  ADD, SUB, MUL and DIV, IF EQ/LT/...  and IF
  632.        ZERO.  An expression may be used in these commands only if it is
  633.        entirely contained within parentheses.
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659. Version 2.7: 901015
  660.  
  661. COM-AND: IBM PC Communication Script Language                 Page   8
  662.  
  663.  
  664. III.    Definitions (continued)
  665.  
  666.  
  667.     G. States:
  668.  
  669.        o    String variables are set to blank at the start of a script.
  670.  
  671.        o    Numeric variables are set to zero at the start of a script.
  672.  
  673.        o    EXECUTE does not reset string or numeric variables or clear
  674.         any conditions (SUCCESS/FAILED/WAITFOR/etc).  Neither does
  675.         EXECUTE clear WHEN settings.
  676.  
  677.        o    EXECUTE clears any IF and SWITCH function and GOSUB stack.
  678.  
  679.        o    FCALL does not allow 'branch-back' from a called file to a
  680.         label in the calling file.  FCALL does not reset the ON
  681.         ESCAPE implicit GOSUB (which potentially is a branch-back),
  682.         so be careful!.
  683.  
  684.        o    GOTO must not be used to enter an IF clause or SWITCH case,
  685.         even from within an IF clause or SWITCH.
  686.  
  687.        o    Received text is not processed until RGET, PAUSE or WAITFOR
  688.         instructions are performed.
  689.  
  690.        o    Keystrokes entered during a script are transmitted out the
  691.         comm port (unless HITKEY or SET TTHRU has been invoked).
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714. Version 2.7: 901015
  715.  
  716. COM-AND: IBM PC Communication Script Language                 Page   9
  717.  
  718.  
  719. IV.    Syntax
  720.  
  721.  
  722.     The chapter defines symbols that will be used in command syntax
  723.     descriptions.  Of necessity, some will seem cryptic at first...
  724.     bear with me, please.
  725.  
  726.  
  727.     ->         Author's note.  The command highlighted with '->'
  728.              IS compatible with ASPECT scripting.
  729.  
  730.     *         Author's note.  The command highlighted with '*'
  731.              is documented for ASPECT compatiblity, but not
  732.              implemented in this version of COM-AND.
  733.  
  734.     [A]         optional keyword A
  735.  
  736.     (A!B!C...)   Required choice: A or B or C ...
  737.  
  738.     Sx         String variable S0,S1,S2...S29
  739.  
  740.     Nx         Numeric variable N0,N1,N2...N99
  741.  
  742.  ->    <label>      Label identifier     (1) literal value (e.g. LABEL)
  743.  ->                     (2) a string variable (e.g.  S0)
  744.  ->                         containing a label name
  745.                      (3) a quoted string (e.g.  "...")
  746.  
  747.  ->    <string>     Textual value, i.e. (1) a quoted string (e.g. "...")
  748.  ->                     (2) a string variable (e.g. S0)
  749.                      (3) a substring (e.g. S0(4:5),
  750.                          being position 4 through 5)
  751.                      (4) a string expression
  752.  
  753.  ->    <number>     Numeric value, i.e. (1) a quoted number (e.g. "4")
  754.  ->                     (2) a literal number (e.g. 555,
  755.                          or hex value e.g. 0xff)
  756.  ->                     (3) a numeric variable (e.g. N5)
  757.                      (4) a string variable (e.g. S0),
  758.                          which contains the value.
  759.                      (5) a numeric expression
  760.  
  761.     <row>         Numeric value representing a row number (0-24 or 0-42
  762.              according to the screen mode).  Expressions (e.g.
  763.              N0+1) are legitimate and accepted.
  764.  
  765.     <col>         Numeric value representing a column number (0-79).
  766.              Expressions are legitimate and accepted.
  767.  
  768.  
  769. Version 2.7: 901015
  770.  
  771. COM-AND: IBM PC Communication Script Language                 Page  10
  772.  
  773.  
  774. IV.    Syntax (continued)
  775.  
  776.  
  777.     <len>         Numeric value representing a length (0-79).  Expres-
  778.              sions (e.g. N0+1) are legitimate and accepted.
  779.  
  780.     <color>      Color keyword or value.  These are:
  781.  
  782.              0      Black            8    DkGrey (Dark Grey)
  783.              1      Blue               9    LtBlue
  784.              2      Green           10    LtGn (Light Green)
  785.              3      Cyan              11    LtCyan
  786.              4      Red              12    LtRed
  787.              5      Magenta          13    LtMagenta
  788.              6      Brown           14    Yellow
  789.              7      LtGrey (Light Grey) 15    White
  790.  
  791.               DEFAULT: This keyword specifies the foreground/
  792.               background attr set through Alt-J for menues.
  793.  
  794.               CONTRAST: This keyword specifies the foreground/
  795.               background attr (reversed) as specified through
  796.               Alt-J for menues.
  797.  
  798.               TEXT: This keyword specifies the foreground/
  799.               background as specified through Alt-J for text.
  800.  
  801.               TCONTRAST: This keyword specifies the foreground/
  802.               background (reversed) text as specified in Alt-J.
  803.  
  804.  ->    <attr>         A foreground/background attribute.  This may be
  805.  ->             of two forms: 0-255 (background value*16+foreground)
  806.  
  807.              and:       ([<color>] <color>).
  808.              or        ([DEFAULT] DEFAULT)
  809.              or        ([CONTRAST] CONTRAST)
  810.              or        any mix of the above
  811.  
  812.              For example "15" and "(black white)" are equivalent
  813.              attributes to COM-AND.  "(DEFAULT)" sets the attribute
  814.              the default set through Alt-J for menu windows.
  815.  
  816.     #         A single digit
  817.  
  818.     (#)         A digit within literal parenthesis
  819.  
  820.  
  821.  
  822.  
  823.  
  824. Version 2.7: 901015
  825.  
  826. COM-AND: IBM PC Communication Script Language                 Page  11
  827.  
  828.  
  829. V.    Script Language Commands
  830.  
  831.  
  832.     ACCESSORY <string>             or ACCESSORY <number>
  833.  
  834.          The ACCESSORY statement invokes the accessory directory to
  835.          (optionally) execute a new script, and (optionally) load a
  836.          program.  The accessory directory entry number specified is in
  837.          <string>.    <String> is formatted exactly as with the F1 menu; it
  838.          consists of an entry number 1-50.    Examples:
  839.  
  840.          ACCESSORY 1         ; Load entry 1
  841.          ; Nothing past this point in the script will be performed.
  842.  
  843.          Each accessory entry specifies:
  844.  
  845.          o         A drive:subdirectory (optional)
  846.          o         A script to be executed (optional)
  847.          o         A program invocation (optional)
  848.  
  849.          Accessory entries are constructed and modified with the 'r' sub-
  850.          command of the F1 menu or SET ACCESSORY script commands.
  851.  
  852.          The ACCESSORY command terminates the current script file.    The
  853.          current script file is closed (and not re-entered when the new
  854.          file completes).  Any IF/GOSUB/SWITCH commands in effect are
  855.          cleared.
  856.  
  857.          Unlike EXECUTE, all strings and conditions are cleared when the
  858.          Accessory script (if there is one) begins.  Parameters may not
  859.          therefore be passed to an accessory script (yet!).
  860.  
  861.  ->    ADD Nx Ny Nz
  862.  
  863.          The ADD command performs the instruction:    Nz = Nx+Ny.  No error
  864.          checking is performed; should the value exceed the range of a
  865.          numeric variable, results are unpredictable.  Example:
  866.  
  867.  ->         ADD N1 N2 N3         ; N3 = N1+N2
  868.  
  869.          An expression may be used for Nx or Ny if it is entirely
  870.          contained within parentheses.
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879. Version 2.7: 901015
  880.  
  881. COM-AND: IBM PC Communication Script Language                 Page  12
  882.  
  883.  
  884. V.    Script Language Commands (continued)
  885.  
  886.  
  887.  ->    ALARM [<number>]
  888.  
  889.          The ALARM command sounds COM-AND's alarm.  The alarm continues
  890.          for the time in seconds specified through the Alt-S 'Display
  891.          duration', unless overridden by the optional numeric argument.
  892.          Any keypress terminates the alarm.  Example:
  893.  
  894.  ->         ALARM 10                 ; Annoy for 10 seconds
  895.  
  896.     ALOAD <string>
  897.  
  898.          The ALOAD statement loads a new Accessory Definition file (F1).
  899.          The ALOAD command requires a file name in <string>.  <String>
  900.          contains an unqualified file.ext (or may contain -> a fully
  901.          pathed file name).  Example:
  902.  
  903.          ALOAD "COM-AND.ACC"             ; Load original accessory def
  904.          ALOAD "C:\SOURCE\COM-AND.ACC"   ; Load special definitions
  905.  
  906.          Note:  The file name is limited to 27 characters in length.
  907.  
  908.     ALLOCATE <number>
  909.  
  910.          The ALLOCATE statement allocates up to 100 dynamic variables
  911.          referenced V0, V1, ... for use by the current and subsequent
  912.          scripts.  ALLOCATE returns success/failure according to avail-
  913.          able memory.  Please refer to Appendix I for a discussion of
  914.          dynamic allocation of variables.  Example:
  915.  
  916.          ALLOCATE N0             ; Allocate a dynamic area
  917.  
  918.          Note:  The number of dynamic variables is limited to 100.
  919.  
  920.     ANAME Sx <number>
  921.  
  922.          The ANAME command returns the name field from the accessory
  923.          directory.  A directory number (1-50) must be specified.
  924.          Example:
  925.  
  926.          ANAME S0 5              ; Fetch the name from # 5
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934. Version 2.7: 901015
  935.  
  936. COM-AND: IBM PC Communication Script Language                 Page  13
  937.  
  938.  
  939. V.    Script Language Commands (continued)
  940.  
  941.  
  942.     APGM Sx <number>
  943.  
  944.          The APGM command returns the program invocation field from the
  945.          accessory directory.  A directory number (1-50) must be speci-
  946.          fied.  Example:
  947.  
  948.          APGM S0 5                 ; Fetch the pgm from # 5
  949.  
  950.     ASCRIPT Sx <number>
  951.  
  952.          The ASCRIPT command returns the script field from the
  953.          accessory directory.  A directory number (1-50) must be
  954.          specified.  Example:
  955.  
  956.          ASCRIPT S0 5             ; Fetch the name from # 5
  957.  
  958.  ->    ASSIGN Sx <string>
  959.  
  960.          The ASSIGN statement allows a string variable to be set to a
  961.          value.  The value may be another string variable, a literal
  962.          textual value (a quoted string), or a substring.  Examples:
  963.  
  964.  ->         ASSIGN S0 "MAIL"        ; S0 now contains "MAIL"
  965.  ->         ASSIGN S1 S0         ; S1 now contains "MAIL"
  966.          ASSIGN S2 S0(0:1)         ; S2 now contains "MA" (char0:char1)
  967.  
  968.     ASUBDIR Sx <number>
  969.  
  970.          The ASUBDIR command returns the subdirectory field from the
  971.          accessory directory.  A directory number (1-50) must be
  972.          specified.  Example:
  973.  
  974.          ASUBDIR S0 5             ; Fetch the subdir from # 5
  975.  
  976.  ->    ATGET row col attr len Sx
  977.  
  978.          The ATGET statement performs the GET function, i.e.  reading
  979.          the keyboard for a length, with cursor positioning and color
  980.          control.  Example:
  981.  
  982.  ->         ATGET 0 0 15 5 S5         ; Read up to 5 chars into S5 from 0,0
  983.          ATGET 0 0 (black white) 5 S5
  984.  
  985.          Note that the cursor is left positioned after the last
  986.          character read.
  987.  
  988.  
  989. Version 2.7: 901015
  990.  
  991. COM-AND: IBM PC Communication Script Language                 Page  14
  992.  
  993.  
  994. V.    Script Language Commands (continued)
  995.  
  996.  
  997.  ->    ATOI Sx Nx
  998.  
  999.          The ATOI statement converts a value in a string variable to a
  1000.          numeric variable.    If no numeric value is found, or the value ->
  1001.          exceeds the range for numeric variables, the ERROR flag is set.
  1002.          Examples:
  1003.  
  1004.  ->         ASSIGN S0 "1234"        ; S0 now contains "1234"
  1005.  ->         ATOI S0 N1          ; N1 now contains 1234
  1006.          ATOI S2(2:3) N2         ; N2 now contains 34 (char2:char3)
  1007.  
  1008.  ->    ATSAY row col attr <string>
  1009.  
  1010.          The ATSAY statement performs the MESSAGE function, i.e.
  1011.          writing to the screen, with cursor positioning and color
  1012.          control.  Example:
  1013.  
  1014.  ->         ATSAY 0 0 15 "text"     ; Write at 0,0; white on black
  1015.          ATSAY 0 0 (black white) S5
  1016.  
  1017.          Note that the cursor is left positioned after the last
  1018.          character written.
  1019.  
  1020.     ATSCR row col len Sx
  1021.  
  1022.          The ATSCR statement reads the screen starting at the position
  1023.          indicated by <row> and <col>, for the length specified into the
  1024.          string variable Sx.  The screen display characters (not their
  1025.          color attributes) are copied into Sx.  Example:
  1026.  
  1027.          ATSCR 2 0 80 S5         ; Read the whole of line 2 into S5
  1028.  
  1029.  ->    BOX row col row col attr
  1030.  
  1031.          The BOX statement draws a box over a region on the screen,
  1032.          filling the space within with a specified color.  The first and
  1033.          second arguments specify the row/column of the top-left of the
  1034.          region.  The third and fourth arguments specify the row/column
  1035.          of the bottom-right of the region.  The last argument specifies
  1036.          the color attribute to be used for the characters written.
  1037.  
  1038.  ->         BOX 0 10,10 20,20 15    ; White on black:    narrow box
  1039.          BOX 0 10,10 20,20 (black white)
  1040.  
  1041.  
  1042.  
  1043.  
  1044. Version 2.7: 901015
  1045.  
  1046. COM-AND: IBM PC Communication Script Language                 Page  15
  1047.  
  1048.  
  1049. V.    Script Language Commands (continued)
  1050.  
  1051.  
  1052.  ->    BREAK [<number>]
  1053.  
  1054.          The BREAK statement performs a true break.  The length of the
  1055.          BREAK is set (by default) through the Alt-S menu.    The length
  1056.          of the signal optionally may be specified in milliseconds.
  1057.          Example:
  1058.  
  1059.  ->         BREAK 1500          ; Send a 1.5 second break
  1060.  
  1061.  ->    BYE
  1062.  
  1063.          The BYE statement terminates both the script and COM-AND,
  1064.          leaving DTR as-is (connection, if made, is not broken).  It may
  1065.          be coded at any level (for example within a subroutine reached
  1066.          through a call from a subroutine).  Example:
  1067.  
  1068.  ->         BYE             ; Leave connection open
  1069.          ; Nothing past this point in the script is executed
  1070.  
  1071.          Note also the QUIT command.
  1072.  
  1073.  ->    CASE (<string>!<numeric>)
  1074.  
  1075.          The CASE statement must be contained within the domain of a
  1076.          SWITCH/ENDSWITCH pair.  The CASE statement specifies a value
  1077.          against which the string variable identified is tested.  Case
  1078.          is not significant in the comparison.  If the variable matches
  1079.          the given string (shift case excluded), the statements following
  1080.          the CASE will be executed, until an ENDCASE is encountered.
  1081.          Refer to SWITCH for an example.
  1082.  
  1083.          Note that the argument of a CASE statement may be a literal or
  1084.          variable value.  Both string and numeric variables are allowed.
  1085.          String substring extraction (e.g.    S0(5:10)) is also supported.
  1086.  
  1087.  ->    CHDIR <string>
  1088.  
  1089.          The CHDIR statement changes the current default subdirectory
  1090.          used for unqualified file name references.  Examples:
  1091.  
  1092.  ->         CHDIR "\COM-AND"        ; Change path on the current drive
  1093.          CHDIR "C:\COM-AND"      ; Change drive and path
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099. Version 2.7: 901015
  1100.  
  1101. COM-AND: IBM PC Communication Script Language                 Page  16
  1102.  
  1103.  
  1104. V.    Script Language Commands (continued)
  1105.  
  1106.  
  1107.  ->    CLEAR [<attr>]
  1108.  
  1109.          The CLEAR statement clears the screen.  It optionally changes
  1110.          the background and foreground colors.  The <attr> argument
  1111.          specifies a new background color (if present), and a new
  1112.          foreground color.    Note that a foreground argument requires a
  1113.          background argument.  Example:
  1114.  
  1115.  ->         CLEAR 15             ; Clear screen, set white on black
  1116.          CLEAR (BLACK RED)         ; Clear screen, set red on black
  1117.          CLEAR             ; Clear screen, leave colors alone
  1118.  
  1119.          CLEAR sets the cursor to the top left of the scrolling region,
  1120.          either as defined by default, or through the DWINDOW command.
  1121.  
  1122.     CLOG OPEN <string>
  1123.     CLOG CLOSE
  1124.     CLOG <string>
  1125.  
  1126.          The CLOG subcommands OPEN a call-log file by name, CLOSE an
  1127.          open call-log file, and write to the call-log (if open).
  1128.  
  1129.          The CLOG OPEN command requires a file name.  The <string> is
  1130.          limited to 26 characters in length.  It may contain a fully
  1131.          pathed file name.    The given name will be searched for on the
  1132.          current drive:subdirectory and the one specified by the
  1133.          'COM-AND=' environment variable.  Example:
  1134.  
  1135.          CLOG OPEN "Log.txt"     ; Open calllog file and start logging
  1136.          CLOG OPEN "E:log.txt"   ; Open calllog on RAM drive
  1137.  
  1138.          CLOG OPEN sets the SUCCESS/FAILURE condition (tested with the
  1139.          IF statement).
  1140.  
  1141.          Note that the script write may choose to open a call-log file
  1142.          by name (closing the default call-log, if one is established)
  1143.          or alternatively to accept the user's discretion in the matter.
  1144.          The CLOG command writes to the call-log only if it is open.  If
  1145.          the script writer does not open the call-log (CLOG OPEN or SET
  1146.          CALLLOG ON), CLOG commands will be ignored unless call-logging
  1147.          has been enabled BY THE USER.
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154. Version 2.7: 901015
  1155.  
  1156. COM-AND: IBM PC Communication Script Language                 Page  17
  1157.  
  1158.  
  1159. V.    Script Language Commands (continued)
  1160.  
  1161.  
  1162.  ->    COLOR <attr>
  1163.  
  1164.          The COLOR statement changes the foreground (and optionally the
  1165.          background display colors.  The first argument specifies a new
  1166.          background color.    The second argument specifies a new fore-
  1167.          ground color.  Note that a background argument requires a fore-
  1168.          ground argument.  Example:
  1169.  
  1170.  ->         COLOR 15             ; Set white on black
  1171.          COLOR (0 15)         ; Set white on black
  1172.          COLOR (BLACK RED)         ; Set red on black
  1173.          COLOR (RED)         ; Set foreground to red
  1174.  
  1175.     COMBASE <port> Nx
  1176.  
  1177.          The COMBASE statement returns the base address for the given
  1178.          port (port is COM1, COM2...).  This value may be set through
  1179.          Alt-P (manually) or SET COMBASE in a script.
  1180.  
  1181.          COMBASE COM1 N0         ; Read current base address
  1182.  
  1183.     COMPARMS Sx
  1184.  
  1185.          The COMPARMS statement returns the current communications
  1186.          parameters, formatted:  "bbbb,p,d,s,COMx" where "bbbb" is
  1187.          baud rate, "p" is parity (E/O/N), "d" is the number of data
  1188.          bits (7/8), "s" is the number of stop bits (1/2), and "COMx"
  1189.          is the comm port.    Example:
  1190.  
  1191.          COMPARMS S4         ; Read current settings
  1192.  
  1193.     COMVECTOR <port> Nx
  1194.  
  1195.          The COMVECTOR statement returns the vector # (0-7) for the
  1196.          given port (port is COM1, COM2...).  This value may be set
  1197.          through Alt-P (manually) or SET COMVECTOR in a script.
  1198.  
  1199.          COMVECTOR COM1 N0         ; Read current vector #
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209. Version 2.7: 901015
  1210.  
  1211. COM-AND: IBM PC Communication Script Language                 Page  18
  1212.  
  1213.  
  1214. V.    Script Language Commands (continued)
  1215.  
  1216.  
  1217.     CONCAT Sx [(##)!*] <string>
  1218.  
  1219.          The CONCAT statement concatenates two strings.  The first
  1220.          string is the target variable (Sx).  The second string is the
  1221.          text to be concatenated.  Concatenation may take place at a
  1222.          fixed position in the target, or the target may be backscanned
  1223.          for the last nonblank character.  Example:
  1224.  
  1225.          S1 = "MAIL"             ; Set file name 1st 4 char
  1226.          CONCAT S0 "_DATE"(0:1)  ; Take month num from date
  1227.          CONCAT S0 "_DATE"(3:4)  ; Take day num from date
  1228.          CONCAT S0(8) ".TXT"     ; Add extension at column 8
  1229.  ->         LOG OPEN S0         ; Open log file "MAILmmdd.TXT"
  1230.  
  1231.          Note that "*" may be specified instead of an index (0,1,2...)
  1232.          after the target variable.  "*" specifies that the concaten-
  1233.          ation is to be performed without blank trimming.  Example:
  1234.  
  1235.          CONCAT S0 * S1         ; Concat S1 at LENGTH S0
  1236.  
  1237.  ->    CONNECT
  1238.  
  1239.          The CONNECT statement terminates a COM-AND script, returning to
  1240.          CRT mode.    It may be coded at any level (for example within a
  1241.          subroutine reached through a call from a subroutine).  Example:
  1242.  
  1243.  ->         CONNECT             ; End of script
  1244.          ; Nothing past this point in the script is executed
  1245.  
  1246.          Note also the EXIT and TERMINAL command.
  1247.  
  1248.     CRC <string> Nx
  1249.  
  1250.          The CRC statement computes a CRC for the string given.  This
  1251.          CRC might be transmitted after the string to automate error
  1252.          detection and recovery.  Example:
  1253.  
  1254.          CRC S0(0:19) N0         ; Compute CRC for 20 characters
  1255.          S0(20:24) = N0         ; Add CRC to the string
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264. Version 2.7: 901015
  1265.  
  1266. COM-AND: IBM PC Communication Script Language                 Page  19
  1267.  
  1268.  
  1269. V.    Script Language Commands (continued)
  1270.  
  1271.  
  1272.     CTOI <string> Nx
  1273.  
  1274.          The CTOI statement converts a string (1st byte) to a numeric
  1275.          variable.    Only a single character is extracted.  The value in
  1276.          the numeric variable is the character.  Example:
  1277.  
  1278.          S0 = "A"                ; Place something in a string
  1279.          CTOI S0 N0          ; N0 now contains a 65 (ASCII "A")
  1280.  
  1281.  ->    CUROFF
  1282.  
  1283.          The CUROFF statement turns off the blinking cursor.  The cursor
  1284.          will be restored by the CURON command or upon exit.  Example:
  1285.  
  1286.  ->         CUROFF             ; Turn off the cursor
  1287.  
  1288.  ->    CURON
  1289.  
  1290.          The CURON statement restores on the blinking cursor.  This has
  1291.          no effect unless a CUROFF was performed previously.  Example:
  1292.  
  1293.  ->         CURON             ; Turn back on the cursor
  1294.  
  1295.  ->    CURSOR Nx Ny
  1296.  
  1297.          The CURSOR statement reads the current cursor position.  Nx
  1298.          returns the row number, and Ny returns the column number.
  1299.          Example:
  1300.  
  1301.  ->         CURSOR N0,N1         ; Read current cursor row,col
  1302.  
  1303.  ->    CWHEN [(#)]
  1304.  
  1305.          The CWHEN statement clears a WHEN setting.  10 WHEN settings are
  1306.          available (WHEN (0), WHEN (1) ...    WHEN (9), with the unquali-
  1307.          fied WHEN equivalent to WHEN(0)).    Each must be set and cleared
  1308.          individually.  Examples:
  1309.  
  1310.  ->         CWHEN             ; Clear primary WHEN setting
  1311.          CWHEN (0)             ; Same as CWHEN
  1312.          CWHEN (9)             ; Clear last WHEN
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319. Version 2.7: 901015
  1320.  
  1321. COM-AND: IBM PC Communication Script Language                 Page  20
  1322.  
  1323.  
  1324. V.    Script Language Commands (continued)
  1325.  
  1326.  
  1327.  ->    DATE Sx [0!1]
  1328.  
  1329.          The DATE statement stores the current system date into the
  1330.          target variable.  Example:
  1331.  
  1332.  ->         DATE S0             ; Get today's date
  1333.  
  1334.          The date is formatted according to the optional argument (if
  1335.          provided and nonzero, the date is formatted mm/dd/yyyy;
  1336.          otherwise it is formatted mm/dd/yy).
  1337.  
  1338.  ->    DBOX row col row col attr
  1339.  
  1340.          The DBOX statement draws a box using double line borders, over a
  1341.          region on the screen, filling the space within with a specified
  1342.          color.  The first and second arguments specify the row/column of
  1343.          the top-left of the region.  The third and fourth arguments
  1344.          specify the row/column of the bottom-right of the region.    The
  1345.          last argument specifies the color attribute to be used for the
  1346.          characters written.  Example:
  1347.  
  1348.          DBOX 0 10,10 20,20 (black white)
  1349.  
  1350.     DEALLOCATE
  1351.  
  1352.          The DEALLOCATE statement deallocates dynamic variables if they
  1353.          are currently allocated.  Example:
  1354.  
  1355.          DEALLOCATE          ; DEALLOCATE dynamic variables
  1356.  
  1357.  ->    DEC Nx
  1358.  
  1359.          The DEC command performs the instruction:    Nx = Nx-1.  No error
  1360.          checking is performed; should the value exceed the range of a
  1361.          numeric variable, results are unpredictable.  Example:
  1362.  
  1363.  ->         DEC N1             ; N1 = N1-1
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374. Version 2.7: 901015
  1375.  
  1376. COM-AND: IBM PC Communication Script Language                 Page  21
  1377.  
  1378.  
  1379. V.    Script Language Commands (continued)
  1380.  
  1381.  
  1382.     DECRYPT <string> <string> <string>
  1383.  
  1384.          The DECRYPT command decrypts a file (named in the first arg-
  1385.          ument) to a new file (named in the second argument, which will
  1386.          be purged if it exists) using a 32 character password (the third
  1387.          argument).  SUCCESS/FAILURE is set by DECRYPT.  Do not decrypt
  1388.          in place!    Example:
  1389.  
  1390.          DECRYPT "SECRET.ENF" "COM-AND.EXE" "abcdefghijklmnop"
  1391.  
  1392.  ->    DEFAULT
  1393.  
  1394.          The DEFAULT statement must be contained within the domain of a
  1395.          SWITCH/ENDSWITCH pair.  The DEFAULT statement specifies a domain
  1396.          of statements to be executed if none of the preceding CASE
  1397.          statements have been executed.  The DEFAULT does not have to be
  1398.          the last statement in the SWITCH domain...  but should be.  The
  1399.          DEFAULT case is terminated when an ENDCASE is encountered.
  1400.          Refer to SWITCH for an example.
  1401.  
  1402.     DEFTIME <number>
  1403.  
  1404.          The DEFTIME statement sets the default delay for the RGET,
  1405.          WAITFOR, and PAUSE statements.  <number> is a delay interval
  1406.          in seconds.  Example:
  1407.  
  1408.          DEFTIME 60          ; Set original default value back
  1409.  
  1410.     DELETE <file>
  1411.  
  1412.          The DELETE statement deletes a file named in the command.
  1413.          The SUCCESS flag is set according to the result of the command.
  1414.          Example:
  1415.  
  1416.          DELETE "COM-AND.LOG"    ; Delete file on the default d:subd
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429. Version 2.7: 901015
  1430.  
  1431. COM-AND: IBM PC Communication Script Language                 Page  22
  1432.  
  1433.  
  1434. V.    Script Language Commands (continued)
  1435.  
  1436.  
  1437.  ->    DIAL <string>                    or DIAL <number>
  1438.  
  1439.          The DIAL statement invokes the dialing directory to dial the
  1440.          entry number specified in <string>.  <String> is formatted
  1441.          exactly as with the Alt-D menu; it consists of an entry number
  1442.          1-100 prefixed or suffixed by an optional long-distance entry
  1443.          flag.  Examples:
  1444.  
  1445.  ->         DIAL "1"                ; Dial entry 1
  1446.  ->         DIAL "@1"               ; Dial entry 1 with long-distance
  1447.  
  1448.          When a dialing directory entry indicates a script to be per-
  1449.          formed, the indicated script is ignored when the number is
  1450.          dialed from within a script.  Use the LINKED condition of IF to
  1451.          test this for this condition.  [When a script is invoked from
  1452.          Alt-D, LINKED is true.]
  1453.  
  1454.          Dialing is performed as with the redial command (Alt-R).  The
  1455.          number is dialed every <RDELAY> seconds (below, see SET), until
  1456.          connection is established, or ESC is pressed.  [Note: a script
  1457.          may set a maximum number of redial attempts through SET RDMAX,
  1458.          below.  This feature is ONLY available through a script.]
  1459.  
  1460.          The DIAL command sets the FAILED condition if the command was
  1461.          syntactically incorrect or if an ESC was entered to terminate
  1462.          redialing.  [Note: The script intrinsic "_RDPN" may be used to
  1463.          determine if the DIAL FAILED after redialing the maximum number
  1464.          of times (if set), or aborted by the user.]
  1465.  
  1466.  ->    DIR <string>
  1467.  
  1468.          The DIR statement accepts a string argument as a wildcard
  1469.          template and opens a file display window equivalent to the
  1470.          interactive Alt-F command of COM-AND.  Example:
  1471.  
  1472.  ->         DIR "*.*"               ; Show files on current subdir
  1473.  
  1474.     DIRECTORY Sx (<number>)
  1475.  
  1476.          The DIRECTORY command returns the name field from the dialing
  1477.          directory.  A directory number may be specified, or the last
  1478.          dialed entry may be requested.  Example:
  1479.  
  1480.          DIRECT S0 5             ; Fetch the name from # 5
  1481.          DIRECT S1                 ; Fetch name of last dialed
  1482.  
  1483.  
  1484. Version 2.7: 901015
  1485.  
  1486. COM-AND: IBM PC Communication Script Language                 Page  23
  1487.  
  1488.  
  1489. V.    Script Language Commands (continued)
  1490.  
  1491.  
  1492.  ->    DIV Nx Ny Nz
  1493.  
  1494.          The DIV command performs the instruction:    Nz = Nx/Ny.  No error
  1495.          checking is performed;  should the value exceed the range of a
  1496.          numeric variable, results are unpredictable.  Dividing by zero
  1497.          always yields zero.  Example:
  1498.  
  1499.  ->         DIV N1 N2 N3         ; N3 = N1/N2
  1500.  
  1501.          An expression may be used for Nx or Ny if it is entirely
  1502.          contained within parentheses.
  1503.  
  1504.     DLDIR Sx
  1505.  
  1506.          The DLDIR statement reads the current download drive:sub-
  1507.          directory into the string variable Sx.  Example:
  1508.  
  1509.          DLDIR S0               ; Read the current setting
  1510.  
  1511.     DLOAD <string>
  1512.  
  1513.          The DLOAD statement loads a new dialing directory file (Alt-D).
  1514.          The DLOAD command requires a file name in <string> (up to 27
  1515.          characters).  <String> contains an unqualified file.ext (or may
  1516.          contain a fully pathed file name).  Example:
  1517.  
  1518.          DLOAD "COM-AND.DIR"           ; Load original dialing dir
  1519.          DLOAD "C:\SOURCE\COM-AND.DIR" ; Load special directory
  1520.  
  1521.     DNUMBER Sx (<number>)
  1522.  
  1523.          The DNUMBER command returns the number field from the dialing
  1524.          directory.  A directory number may be specified, or the last
  1525.          dialed entry may be requested.  Example:
  1526.  
  1527.          DNUM S0 5                 ; Fetch the nbr from # 5
  1528.          DNUM S1                 ; Fetch number last dialed
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539. Version 2.7: 901015
  1540.  
  1541. COM-AND: IBM PC Communication Script Language                 Page  24
  1542.  
  1543.  
  1544. V.    Script Language Commands (continued)
  1545.  
  1546.  
  1547.     DO
  1548.  
  1549.          The DO statement asserts the beginning of a loop.    The end of
  1550.          the loop is signalled by an UNTIL statement (which is evaluated
  1551.          to determine if looping occurs).  Example:
  1552.  
  1553.          DO              ; Loop until condition below
  1554.          ...
  1555.          UNTIL GE N0,10      ; Loop until N0 >= 10
  1556.  
  1557.          The condition evaluated by the UNTIL is any condition accepted
  1558.          by the IF statement (including conjunctions of conditions, dis-
  1559.          junction of conditions, and so on).
  1560.  
  1561.  
  1562.          Note: (1) GOTO statements may never enter a DO loop;  even
  1563.                to leave an inner loop to return to an outer loop.
  1564.  
  1565.          Note: (2) DO statements may be nested (along with IF, SWITCH,
  1566.                WHILE, and FOR loops) up to 20 levels.  However,
  1567.                they may not overlap other DO loops, or other
  1568.                flow-of-control statements.
  1569.  
  1570.          Note: (3) The clause of the DO statement (the statement after
  1571.                'DO' down to the UNTIL statement) is always execu-
  1572.                ted at least once.  The conditional evaluation is
  1573.                not performed until the end of the clause.
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594. Version 2.7: 901015
  1595.  
  1596. COM-AND: IBM PC Communication Script Language                 Page  25
  1597.  
  1598.  
  1599. V.    Script Language Commands (continued)
  1600.  
  1601.  
  1602.  ->    DOS <string> [WAIT]
  1603.  
  1604.          The DOS command executes any DOS command.    It works by loading
  1605.          a copy of COMMAND.COM (or other SHELL program, as specified by
  1606.          the environment variable COMSPEC=) and passing <string> for
  1607.          execution.  Example:
  1608.  
  1609.  ->         DOS "dir a:"            ; List files on the 'A' drive
  1610.  
  1611.          The optional keyword WAIT signals that COM-AND is to pause
  1612.          after completion for a keypress before the script continues.
  1613.  
  1614.          NOTE: The screen is saved prior to the DOS function, for
  1615.          restoration upon completion.  However, the screen size saved
  1616.          is defined by the DWINDOW currently in effect!
  1617.  
  1618.          This command sets the SUCCESS condition (unless the SHELL cannot
  1619.          be found).
  1620.  
  1621.     DPARMS Sx (<number>)
  1622.  
  1623.          The DPARMS command returns the parameters field from the dialing
  1624.          directory, formatted:  rrrr,p,d,s,e (where r=rate, p = parity
  1625.          (EON), d = #data bits (7,8), s=#stop bits (1,2) and e=echo
  1626.          (Y,N," ").  A directory number may be specified, or the last
  1627.          dialed entry may be requested.  Example:
  1628.  
  1629.          DPARMS S0 5             ; Fetch the parms from # 5
  1630.          DPARMS S1                 ; Fetch parms last dialed
  1631.  
  1632.     DSCRIPT Sx (<number>)
  1633.  
  1634.          The DSCRIPT command returns the script file name from the
  1635.          dialing directory (or blanks).  A directory number may be
  1636.          specified, or the last dialed entry may be requested.  Example:
  1637.  
  1638.          DSCRIPT S0 5             ; Fetch the file from # 5
  1639.          DSCRIPT S1              ; Fetch script last dialed
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649. Version 2.7: 901015
  1650.  
  1651. COM-AND: IBM PC Communication Script Language                 Page  26
  1652.  
  1653.  
  1654. V.    Script Language Commands (continued)
  1655.  
  1656.  
  1657.     DWINDOW row col row col
  1658.     DWINDOW CLEAR
  1659.  
  1660.          The DWINDOW command defines a new scrolling region.  The first
  1661.          row/col pair define the new top-left, and the second row/col
  1662.          pair define the bottom-right.  Example:
  1663.  
  1664.          DWINDOW 10,10,20,70         ; Define a small scroll box
  1665.  
  1666.          DWINDOW CLEAR resets the scrolling region to its maximum size
  1667.          (0,0,23,79 CGA, or 0,0,42/49,79 EGA/VGA).
  1668.  
  1669.          'Home' cursor position is relative to the current definition of
  1670.          the scrolling region (e.g.  CLEAR statement).  The region region
  1671.          is returned to 'normal' when a script terminates.  SET 43 and
  1672.          SET 25, if executed after DWINDOW, reset the scrolling region
  1673.          and clear the DWINDOW.
  1674.  
  1675.          Note that COM-AND appropriates the last line of the current
  1676.          display for status/LEGEND display unconditionally.
  1677.  
  1678.          NOTE: The DWINDOW defines the screen size for the DOS, RUN and
  1679.          SHELL functions (for screen saves and restoration).  DWINDOW
  1680.          should generally be turned off prior to these commands, and
  1681.          reset afterwards.
  1682.  
  1683.     EBL Sx <EBL var>
  1684.  
  1685.          The EBL statement references the global data area maintained by
  1686.          EBL (see Appendix F) if EBL is currently installed.  If EBL is
  1687.          not installed, FAILURE is set.  If EBL is installed, the given
  1688.          variable (%A through %O, or &<name>) will be returned in Sx, up
  1689.          to 80 characters long (EBL allows up to 127 characters).
  1690.          Example:
  1691.  
  1692.          EBL S0 %B             ; Fetch The second variable's value
  1693.          IF FAILURE ...         ; Action if EBL not installed
  1694.  
  1695.          Note:  The EBL command tests for the environment variable
  1696.          'BATINT=' before inquiring for EBL's presence.  EBL users use
  1697.          environment variables to declare a new (hex) interrupt number.
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704. Version 2.7: 901015
  1705.  
  1706. COM-AND: IBM PC Communication Script Language                 Page  27
  1707.  
  1708.  
  1709. V.    Script Language Commands (continued)
  1710.  
  1711.  
  1712.     EBLSET &<name> Sx
  1713.  
  1714.          The EBLSET statement permits modification (and creation if space
  1715.          permits) of EBL external variables (see appendix F) if EBL is
  1716.          currently installed.  If EBL is not installed, or if space does
  1717.          not permit the modification, FAILURE is set.  If EBL is
  1718.          installed, the given variable (named '&<name>) will be set to
  1719.          the value in Sx, up to 80 characters long (EBL allows up to 127
  1720.          characters).  Example:
  1721.  
  1722.          EBLSET &USER S0         ; Set ext var to value in S0
  1723.          IF FAILURE ...         ; Action if EBL not installed
  1724.  
  1725.  ->    ELSE
  1726.  
  1727.          The ELSE statement must be contained within the domain of an
  1728.          IF/ENDIF pair.  Statements following an IF statement are
  1729.          executed if the condition specified was found to be true, and
  1730.          execution continues until an ELSE or ENDIF are encountered.  If
  1731.          the condition tested with the IF was found to be false,
  1732.          statements following the ELSE statement (if present) will be
  1733.          executed.    Refer to the IF statement for an example.
  1734.  
  1735.          Note that ELSE may contain the statement to be executed on its
  1736.          own line, in which case no ENDIF is required.
  1737.  
  1738.  ->    EMULATE (TTY!ANSI!VIDTEX!VT100!VT52)
  1739.  
  1740.          The EMULATE command specifies terminal emulation.    COM-AND
  1741.          provides the following emulations (refer to COM-AND.DOC for
  1742.          details):    TTY (b/w), ANSI (color), VIDTEX (for CIS), VT-100
  1743.          and VT-52.  Example:
  1744.  
  1745.  ->         EMULATE TTY         ; Set screen to B&W
  1746.  
  1747.          Note that "EMULATE VIDTEX" is equivalent to "SET ENQ CISB".
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759. Version 2.7: 901015
  1760.  
  1761. COM-AND: IBM PC Communication Script Language                 Page  28
  1762.  
  1763.  
  1764. V.    Script Language Commands (continued)
  1765.  
  1766.  
  1767.     ENCRYPT <string> <string> <string> [DES!SIMPLE!AUTO]
  1768.  
  1769.          The ENCRYPT command encrypts a file (named in the first arg-
  1770.          ument) to a new file (named in the second argument, which will
  1771.          be purged if it exists) using a 32 character password (the third
  1772.          argument).  An optional keyword specifies the method (DES is
  1773.          default).    SUCCESS/FAILURE is set by ENCRYPT.  Do not encrypt in
  1774.          place!  Example:
  1775.  
  1776.          ENCRYPT "COM-AND.EXE" "SECRET.ENF" "abcdefghijklmnop"
  1777.  
  1778.          Note that scripts are automatically decrypted when encountered
  1779.          by COM-AND.  You do not need to decrypt a script in order to
  1780.          EXECUTE it (but you may if you wish...).
  1781.  
  1782.  ->    ENDCASE
  1783.     ENDFOR
  1784.  ->    ENDIF
  1785.  ->    ENDSWITCH
  1786.     ENDWHILE
  1787.  
  1788.          The 'END' statements terminate the domain of 'CASE' (and
  1789.          'DEFAULT'), 'FOR', 'IF', 'SWITCH' and 'WHILE' statements,
  1790.          respectively.  [Note, "DO" is terminated by "UNTIL".] Each of
  1791.          these domain statements MUST be paired with its terminating
  1792.          statement.
  1793.  
  1794.     ENVIRON Sx <string>
  1795.  
  1796.          The ENVIRON statement returns the value associated with the
  1797.          variable <string> in the current environment block.  Envi-
  1798.          ronment variables are established with the DOS SET command,
  1799.          before COM-AND is entered (SET commands executed through the DOS
  1800.          SHELL have no effect on COM-AND).    Example:
  1801.  
  1802.          ENVIRON S5 "COMSPEC="   ; Get current shell pgm name
  1803.  
  1804.          ENVIRON sets and reset the FOUND flag according to operation.
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814. Version 2.7: 901015
  1815.  
  1816. COM-AND: IBM PC Communication Script Language                 Page  29
  1817.  
  1818.  
  1819. V.    Script Language Commands (continued)
  1820.  
  1821.  
  1822.  ->    EXECUTE <string>
  1823.  
  1824.          The EXECUTE command chains to a new script file.  The current
  1825.          script file is closed (and not re-entered when the new file
  1826.          completes).  Any IF/GOSUB/SWITCH/DO/WHILE commands in effect are
  1827.          cleared.  Example:
  1828.  
  1829.  ->         EXECUTE "newfile.cmd"   ; Pick up with a new script
  1830.          ; Nothing past this point in the script will be performed.
  1831.  
  1832.          Note that string variables and conditions are retained as they
  1833.          are when the new script file begins execution.  In this way,
  1834.          parameters may be passed to a new script.
  1835.  
  1836.  ->    EXIT
  1837.  
  1838.          The EXIT command terminates the script execution.    It may be
  1839.          coded at any level (for example within a subroutine reached
  1840.          through a call from a subroutine).  Example:
  1841.  
  1842.  ->         EXIT             ; Terminate the script processor
  1843.          ; Nothing past this point in the script will be performed.
  1844.  
  1845.          NOTE: When the script processor reaches end-of-file, an implicit
  1846.          EXIT is performed.  This is true in EXECUTed as well as FCALLed
  1847.          scripts.
  1848.  
  1849.  ->    FATSAY row col attr <string> <parms>
  1850.  
  1851.          The FATSAY statement performs the MESSAGE function, i.e.
  1852.          writing to the screen, with cursor positioning and color
  1853.          control.  Parameters are formatted into the string provided from
  1854.          the list provided.  Example:
  1855.  
  1856.  ->         FATSAY 0 0 15 "The answer is %d %s" N0 S0 ; Value and label
  1857.          FATSAY 0 0 (black white) "The answer is %d %s" N0 S0
  1858.  
  1859.          Note that the cursor is left positioned after the last character
  1860.          written.  Refer to the STRFMT statement for discussion of
  1861.          parameter formatting.
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869. Version 2.7: 901015
  1870.  
  1871. COM-AND: IBM PC Communication Script Language                 Page  30
  1872.  
  1873.  
  1874. V.    Script Language Commands (continued)
  1875.  
  1876.  
  1877.     FATTR Sx <file>
  1878.  
  1879.          The FATTR command formats the file attribute byte as binary
  1880.          digits into the target string (Sx).  The file name specifi-
  1881.          cation may be a literal quoted string, or a string variable.
  1882.          The formatted string is 8 characters, either 0 or 1.  Example:
  1883.  
  1884.          FATTR S3 "COM-AND.EXE"          ; Format into S3
  1885.  
  1886.          The FATTR command sets and resets the SUCCESS flag according to
  1887.          the presence of the named file.  The bits returned have meaning:
  1888.  
  1889.          xxxxxxxx
  1890.             ^------------------------  Read-only file
  1891.            ^-------------------------  Hidden file
  1892.           ^--------------------------  System file
  1893.          ^---------------------------  File is a volume ID
  1894.         ^----------------------------  File is a subdirectory
  1895.            ^-----------------------------  Archive bit for the file
  1896.           ^------------------------------  Always 0
  1897.          ^-------------------------------  Always 0
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924. Version 2.7: 901015
  1925.  
  1926. COM-AND: IBM PC Communication Script Language                 Page  31
  1927.  
  1928.  
  1929. V.    Script Language Commands (continued)
  1930.  
  1931.  
  1932.     FCALL <file>
  1933.  
  1934.          The FCALL command invokes the file given as if it were a
  1935.          subroutine.  If the new file is encrypted, a password will be
  1936.          requested (if the calling file is encrypted, the password to
  1937.          the old file is not requested upon return).  Example:
  1938.  
  1939.          FCALL "SUBS.CMD"                ; Call a file
  1940.  
  1941.          The called file returns to the caller upon an FRETURN instruc-
  1942.          tion.  If end-of-file or EXIT is encountered in the called
  1943.          file, the script terminates.  [Note that "IF FCALLed" permits
  1944.          determination that the current file was entered via FCALL.]
  1945.  
  1946.          FCALL does not allow a branch out of the called file back into
  1947.          the caller's file.  Labels in an FCALLed file MAY duplicate
  1948.          labels in the caller's file.  Note that ON ESCAPE is not reset
  1949.          on entry via FCALL, and unless the new script has the identical
  1950.          label, the script fails (label not found) on escape.
  1951.  
  1952.          For performance purposes, FCALL does NOT close the calling file
  1953.          when the new script file is opened.  All script files are closed
  1954.          upon exit... however, a recursion amongst scripts may quickly
  1955.          consume all DOS file handles.  Avoid pairs of scripts where each
  1956.          script FCALLs the other.
  1957.  
  1958.          FCALLs may be nested to a depth of up to 10.
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979. Version 2.7: 901015
  1980.  
  1981. COM-AND: IBM PC Communication Script Language                 Page  32
  1982.  
  1983.  
  1984. V.    Script Language Commands (continued)
  1985.  
  1986.  
  1987.  ->    FCLOSEI
  1988.  ->    FCLOSEO
  1989.  
  1990.          The FCLOSEI and FCLOSEO commands close a file opened for input
  1991.          or output.  FCLOSE<I!O> on a file not opened does not hurt
  1992.          anything.    When a file is closed, all blocks pending are flushed
  1993.          to the file.  Example:
  1994.  
  1995.  ->         FCLOSEI             ; We're done with it
  1996.  
  1997.          Please note that, when opened for output in TEXT mode, COM-AND
  1998.          does not add a final ^Z (ASCII EOF convention).  The script
  1999.          author may choose to precede FCLOSEO with a 'WRITE ^Z"' as need
  2000.          dictates.
  2001.  
  2002.     FDATE Sx <file> [0!1]
  2003.  
  2004.          The FDATE command places the date last modified (as known by
  2005.          DOS) into the target string (Sx).    The file name specification
  2006.          may be a literal quoted string, or a string variable.  The date
  2007.          is formatted according to the optional format argument (if
  2008.          provided and nonzero, the date is formatted mm/dd/yyyy;
  2009.          otherwise it is formatted mm/dd/yy).  Example:
  2010.  
  2011.          FDATE S3 "COM-AND.EXE" 1        ; Format date into S3
  2012.  
  2013.          The FDATE command sets and resets the SUCCESS flag.
  2014.  
  2015.     FFIRST Sx
  2016.  
  2017.          The FFIRST command initializes a wildcard lookup.    If SUCCESS is
  2018.          set after FFIRST, file names may be obtained using the FNEXT
  2019.          command.  Only one thread of file name lookups is performed at
  2020.          anyone time;  invoking FFIRST when there are more file names to
  2021.          be returned terminates the previous thread.  Example:
  2022.  
  2023.          FFIRST "*.asm"                  ; Initialize lookup
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034. Version 2.7: 901015
  2035.  
  2036. COM-AND: IBM PC Communication Script Language                 Page  33
  2037.  
  2038.  
  2039. V.    Script Language Commands (continued)
  2040.  
  2041.  
  2042.  ->    FGETC Sx
  2043.  ->    FGETS Sx
  2044.  
  2045.          The FGETC and FGETS commands read a character (FGETC) or a
  2046.          string (FGETS) into a string variable.  The input file must be
  2047.          opened by a previous FOPENI, of course.
  2048.  
  2049.          In TEXT mode, the FGET commands translate CR/LF pairs in the
  2050.          input file to single LFs.    No tab expansion is performed.    In
  2051.          TEXT mode, the FGET commands stop on an ASCII EOF (Ctl-Z).
  2052.  
  2053.          FGETC reads a single character into Sx(0:0).  FGETS reads up to
  2054.          80 characters into Sx.  If the input file was opened in TEXT
  2055.          mode, the read string terminates at the 80th byte or a CR/LF
  2056.          pair (placed in Sx as a single LF).  Example:
  2057.  
  2058.  ->         FGETS S0             ; Read up to 80 bytes
  2059.  
  2060.          The FGET commands set the EOF condition on input EOF.  This may
  2061.          be tested with the IF statement.
  2062.  
  2063.          Note also: FREAD and READ commands.
  2064.  
  2065.  ->    FIND Sx <string> [Nx]
  2066.  
  2067.          The FIND command tests for a substring within a target string.
  2068.          Case is not significant.  This command sets the FOUND condition
  2069.          for the IF command.  Example:
  2070.  
  2071.  ->         FIND S0 "sentence"      ; Test for the word 'sentence'
  2072.  
  2073.          Note the optional numeric variable argument.  If supplied, the
  2074.          index (0,1,2,3...) to the substring within the target string is
  2075.          placed in the indicated numeric variable.
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089. Version 2.7: 901015
  2090.  
  2091. COM-AND: IBM PC Communication Script Language                 Page  34
  2092.  
  2093.  
  2094. V.    Script Language Commands (continued)
  2095.  
  2096.  
  2097.     FNEXT  Sx [QUAL]
  2098.  
  2099.          The FNEXT command returns file names from a wildcard lookup.  If
  2100.          SUCCESS is set after FNEXT, the given string variable contains
  2101.          the next file name from the template match begun with FFIRST.
  2102.          IF FAILURE is set, the string variable is also set to nulls.
  2103.          Example:
  2104.  
  2105.          FNEXT S0                 ; Return name.ext
  2106.          FNEXT S0 QUAL             ; Return fully qualified name
  2107.  
  2108.          Wildcard lookup must be initialized with the FFIRST command.
  2109.          The optional 'QUAL' modifier controls whether the returned name
  2110.          is "name.ext" or fully qualified with drive:subdirectory.
  2111.  
  2112.  ->    FOPENI <file> [TEXT!BINARY]
  2113.  ->    FOPENO <file> [TEXT!BINARY!APPEND]
  2114.  
  2115.          The FOPENI and FOPENO commands open a file for input or output.
  2116.          COM-AND currently supports one file opened for input and one for
  2117.          output at any one time.  I/O to/from the file is blocked for
  2118.          fastest access.
  2119.  
  2120.          Files opened for input may be declared TEXT or BINARY in the
  2121.          open statement.  The default is TEXT.  When the file is opened,
  2122.          it is positioned to the start of the file.
  2123.  
  2124.          Files opened for output may be declared TEXT or BINARY in the
  2125.          open statement.  The default is TEXT.  On output, unless APPEND
  2126.          is specified, the file is purged if it existed previously.  On
  2127.          output, if APPEND is specified, the file is created if it does
  2128.          not exist, and positioned to end-of-file.
  2129.  
  2130.  ->         FOPENI "COM-AND.UFL" TEXT       ; Open file in text mode
  2131.          FOPENO "COM-AND.LOG" TEXT APPEND; Open file, add to old data
  2132.  
  2133.          The FOPEN commands set the SUCCESS flag according to completion.
  2134.  
  2135.          Refer to FCLOSE, FGET, FPUT, FREAD, FWRITE, READ and WRITE for
  2136.          details of input/output file handling.  Also refer to REWIND,
  2137.          FSAVE and FRESTORE for positioning controls.
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144. Version 2.7: 901015
  2145.  
  2146. COM-AND: IBM PC Communication Script Language                 Page  35
  2147.  
  2148.  
  2149. V.    Script Language Commands (continued)
  2150.  
  2151.  
  2152.     FOR Nx = <init> <final> [<step>]
  2153.  
  2154.          The FOR statement asserts the beginning of a loop, controlled by
  2155.          the value of a specific numeric index.  The initial value, the
  2156.          final value, and an optional step value are specified.  [If a
  2157.          step value is not specified, a step of 1 is used.]
  2158.  
  2159.          The FOR statement initializes the index variable to the given
  2160.          value and performs commands until an ENDFOR is encountered.
  2161.          Upon ENDFOR, the index is incremented (or decremented) by the
  2162.          step value and the result tested against the given final value.
  2163.  
  2164.          If the step is positive, the loop terminates when the index is
  2165.          greater than the final value.  If the step is negative, the loop
  2166.          terminates when the index is less than the final value.
  2167.  
  2168.          Example:
  2169.  
  2170.          FOR N0 = 1,10         ; Loop for 10 times
  2171.          ...
  2172.          ENDFOR
  2173.  
  2174.  
  2175.          Note: (1) The STEP and FINAL values are evaluated when the
  2176.                FOR statement is encountered.  Changing intermediate
  2177.                values has no effect on the loop.
  2178.  
  2179.          Note: (2) The loop index specified should not be modified
  2180.                within the loop.  The results are unspecified if so.
  2181.  
  2182.          Note: (3) GOTO statements may never enter a FOR loop;  even
  2183.                to leave an inner loop to return to an outer loop.
  2184.  
  2185.          Note: (4) FOR statements may be nested (along with IF, SWITCH,
  2186.                WHILE and DO loops) up to 20 levels.  However, they
  2187.                may not overlap other FOR loops, or other flow-of-
  2188.                control statements.
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199. Version 2.7: 901015
  2200.  
  2201. COM-AND: IBM PC Communication Script Language                 Page  36
  2202.  
  2203.  
  2204. V.    Script Language Commands (continued)
  2205.  
  2206.  
  2207.  ->    FPUTC Sx
  2208.  ->    FPUTS Sx
  2209.  
  2210.          The FPUTC and FPUTS commands write a character (FPUTC) or a
  2211.          string (FPUTS) from a string variable to the output file.    The
  2212.          output file must be opened by a previous FOPENO.
  2213.  
  2214.          In TEXT mode the FPUT commands translate LFs in the string
  2215.          buffer to CR/LF pairs.  No tab compression is performed.
  2216.  
  2217.          FPUTC writes a single character from Sx.
  2218.  
  2219.          FPUTS writes up to 80 characters from Sx, according to the
  2220.          length of the value in Sx.  Example:
  2221.  
  2222.  ->         FPUTS S0             ; Write up to 80 bytes
  2223.  
  2224.          Note also: FWRITE and WRITE commands.
  2225.  
  2226.  ->    FREAD Sx Nx Ny
  2227.  
  2228.          The FREAD command reads a string (up to Nx characters) into a
  2229.          string variable.  The input file must be opened by a previous
  2230.          FOPENI, of course.
  2231.  
  2232.          In TEXT mode, the FREAD command translates CR/LF pairs in the
  2233.          input file to single LFs, and the read operation ends.  No tab
  2234.          expansion is performed.  If the input file was opened in TEXT
  2235.          mode, the FREAD commands stop on an ASCII EOF character (Ctl-Z).
  2236.  
  2237.          FREAD reads up to 80 characters into Sx.  If the input file was
  2238.          opened in TEXT mode, the read string terminates at the 80th byte
  2239.          or at a CR/LF pair (placed in Sx as a single LF).    The count
  2240.          read is placed in Ny.
  2241.  
  2242.          Example:
  2243.  
  2244.  ->         FREAD S0 80 N4         ; Read 80 bytes; count read in N4
  2245.  
  2246.          The FREAD command sets the EOF condition on input EOF.  This may
  2247.          be tested with the IF statement.
  2248.  
  2249.          Note also: FGETC/FGETS/READ, and especially notes in READ.
  2250.  
  2251.  
  2252.  
  2253.  
  2254. Version 2.7: 901015
  2255.  
  2256. COM-AND: IBM PC Communication Script Language                 Page  37
  2257.  
  2258.  
  2259. V.    Script Language Commands (continued)
  2260.  
  2261.  
  2262.     FREE Sx <string>
  2263.  
  2264.          The FREE statement returns the free space (as a numeric string)
  2265.          on a given disc.  The second operand specifies the drive ("" may
  2266.          be used for the default drive) as "d:", where d = a,b,c...
  2267.          Example:
  2268.  
  2269.          FREE S0 "C:"                   ; Get free space on C:
  2270.  
  2271.     FRESTOREI
  2272.     FRESTOREO
  2273.  
  2274.          The FRESTORE statement restores the last saved position in
  2275.          either the input or output file.  The FRESTORE statement sets
  2276.          the SUCCESS flag according to save-stack underflow.  See FSAVE
  2277.          below for more detail.  Example:
  2278.  
  2279.          FRESTOREI                ; Restore last saved position
  2280.  
  2281.     FRETURN
  2282.  
  2283.          The FRETURN command returns returns from an FCALL instruction.
  2284.          The current file is closed, and the previous file (the one
  2285.          containing the FCALL) continues.  If the file that invoked FCALL
  2286.          is encrypted, the previous password is NOT requested a second
  2287.          time.  Example:
  2288.  
  2289.          FRETURN                 ; Return to calling file
  2290.  
  2291.          The FCALL stack is limited to a depth of 10 FCALLs.
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309. Version 2.7: 901015
  2310.  
  2311. COM-AND: IBM PC Communication Script Language                 Page  38
  2312.  
  2313.  
  2314. V.    Script Language Commands (continued)
  2315.  
  2316.  
  2317.     FSAVEI [CLEAR!SHIFT!POP]
  2318.     FSAVEO [CLEAR!SHIFT!POP]
  2319.  
  2320.          The FSAVE statement saves the current file position (input or
  2321.          output) on a stack for later repositioning (FRESTORE).  Up to 20
  2322.          positions may be saved for each file.  The SUCCESS flag is
  2323.          set/reset according to save-stack overflow.  Example:
  2324.  
  2325.          FSAVEI                 ; To come back later
  2326.  
  2327.          Three subcommands are also provided:
  2328.  
  2329.          FSAVE[I!O] CLEAR             ; Zeroes the save-stack
  2330.          FSAVE[I!O] SHIFT             ; Shifts the stack down one
  2331.          FSAVE[I!O] POP             ; Throws away last saved pos
  2332.  
  2333.          The appropriate file must be open before FSAVE is used.  The
  2334.          FCLOSEx (and FOPENx) instruction clears its save-stack.
  2335.  
  2336.     FSIZE Sx <file>
  2337.  
  2338.          The FSIZE command sets the file size (up to seven digits) into
  2339.          the target string (Sx).  The file name specification may be a
  2340.          literal quoted string, or a string variable.  The SIZE is
  2341.          formatted with leading zeroes blanked and the string right
  2342.          justified in a space of 7 characters.  Example:
  2343.  
  2344.          FSIZE S3 "COM-AND.EXE"          ; Format into S3
  2345.  
  2346.          The FSIZE command sets and resets the SUCCESS flag according to
  2347.          the presence of the named file.
  2348.  
  2349.     FTIME Sx <file> [0!1]
  2350.  
  2351.          The FTIME command sets the time last modified (as known by DOS)
  2352.          into the target string (Sx).  The file name specification may
  2353.          be a literal quoted string, or a string variable.    The TIME is
  2354.          formatted according to the optional format argument (if provided
  2355.          and nonzero, the time is formatted hh:mm:ss where hh is 0-23;
  2356.          otherwise it is formatted hh:mm:ss with a final AM or PM).
  2357.          Example:
  2358.  
  2359.          FTIME S3 "COM-AND.EXE" 1        ; Format military time into S3
  2360.  
  2361.          The FTIME command sets and resets the SUCCESS flag.
  2362.  
  2363.  
  2364. Version 2.7: 901015
  2365.  
  2366. COM-AND: IBM PC Communication Script Language                 Page  39
  2367.  
  2368.  
  2369. V.    Script Language Commands (continued)
  2370.  
  2371.  
  2372.  ->    FWRITE Sx Nx
  2373.  
  2374.          The FWRITE command writes a string from a string variable to the
  2375.          output file.  The length of the string variable is specified by
  2376.          Nx.  The output file must be opened by a previous FOPENO.
  2377.  
  2378.          In TEXT mode the FWRITE command translates LFs in the string
  2379.          buffer to CR/LF pairs.  No tab compression is performed.
  2380.  
  2381.          FWRITE writes up to 80 characters from Sx, according to the
  2382.          value in Nx.
  2383.  
  2384.          Example:
  2385.  
  2386.  ->         FPUTS S0 75         ; Write 75 bytes
  2387.  
  2388.          Note also: FPUTC/FPUTS/WRITE and especially the WRITE command.
  2389.  
  2390.  ->    GET Sx [<number>]
  2391.  
  2392.          The GET command reads the keyboard for text.  Text entry is
  2393.          terminated by a carriage return, or, if the optional numeric
  2394.          argument was supplied, after <number> characters.    Keyentry is
  2395.          echoed back to the screen.  Escape entered in response to the
  2396.          GET command terminates the script.  Example:
  2397.  
  2398.  ->         MESSAGE "^MEnter a password:"
  2399.  ->         GET S0 8             ; Get up to 8 characters
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419. Version 2.7: 901015
  2420.  
  2421. COM-AND: IBM PC Communication Script Language                 Page  40
  2422.  
  2423.  
  2424. V.    Script Language Commands (continued)
  2425.  
  2426.  
  2427.  ->    GETFILE ASCII    <string>     ; A.K.A. Buffer capture
  2428.  ->    GETFILE BYMODEM          ; Batch YMODEM
  2429.  ->    GETFILE BYMODEMG         ; Batch YMODEM-G (BYMOG works too)
  2430.  ->    GETFILE CISB             ; CompuServe B-protocol
  2431.  ->    GETFILE KERMIT             ; Kermit or SuperKermit
  2432.     GETFILE QUICKB             ; CompuServe Quick B-protocol
  2433.  ->    GETFILE RXMODEM <string>     ; Relaxed CRC or Checksum XMODEM
  2434.  ->    GETFILE WXMODEM <string>     ; Windowed XMODEM
  2435.  ->    GETFILE XMODEM    <string>     ; CRC or Checksum XMODEM
  2436.  ->    GETFILE YMODEM    <string>     ; Simple YMODEM (not True ... (TM))
  2437.     GETFILE ZMODEM             ; ZMODEM transfer (batch)
  2438.  
  2439.          The GETFILE statement initiates a download using one of the
  2440.          specified protocols.  The <string> argument must specify a valid
  2441.          file name.  [If the specified file name exists with one of the
  2442.          XMODEMs, a manual "Purge?" query will pop-up.] The GETFILE
  2443.          command sets SUCCESS/FAILURE condition according to the
  2444.          transfer.    Example:
  2445.  
  2446.  ->         GETFILE XMODEM "com-and.arc"  ; Download
  2447.  
  2448.          Note that, in the cases of CISB, KERMIT,Batch YMODEM (G), and
  2449.          ZMODEM, the host tells COM-AND the name the file will take on
  2450.          your machine.  If the name duplicates an existing name, char-
  2451.          acters of the extent are replaced by '$' (right to left).  [If
  2452.          ZMODEM recovery is enabled, a ZMODEM transfer picks up where a
  2453.          failed transfer stopped, using the same file name.]
  2454.  
  2455.  
  2456.          Notes:
  2457.  
  2458.          (1) With ASCII transfers, you must manually terminate the
  2459.          capture with ESC.
  2460.  
  2461.          (2) XMODEM and YMODEM (XMODEM1K) automatically purge the target
  2462.          file if found.  No manual intervention is required.
  2463.  
  2464.          (3) ZMODEM and CIS-B ( and QuickB) provide an automated download
  2465.          function.  The automated function is NOT available within a
  2466.          script unless the script is 'reading the port', i.e. with an
  2467.          RGET, PAUSE or SUSPEND statement.
  2468.  
  2469.          (4) ZMODEM recovery (of a failed transfer) may be enabled and
  2470.          disabled with the SET ZMODEM RECOVER statement.
  2471.  
  2472.  
  2473.  
  2474. Version 2.7: 901015
  2475.  
  2476. COM-AND: IBM PC Communication Script Language                 Page  41
  2477.  
  2478.  
  2479. V.    Script Language Commands (continued)
  2480.  
  2481.  
  2482.  ->    GOSUB <label>
  2483.  
  2484.          The GOSUB statement transfers control to the label specified in
  2485.          <string>.    When a RETURN statement is encountered, execution
  2486.          resumes at the next statement (after the GOSUB).  GOSUB commands
  2487.          may be nested to a maximum stack depth of 20.  Example:
  2488.  
  2489.          IF FOUND             ; Test result of a FIND
  2490.  ->        GOSUB "SUB"          ; If we found it, transfer to sub
  2491.  ->        ENDIF             ; .. and return here
  2492.          ...
  2493.  ->         EXIT             ; End of main-line script
  2494.          ...
  2495.  ->         SUB:
  2496.  ->         MESSAGE "..."           ; Issue a message
  2497.  ->         RETURN             ; And return to after the GOSUB
  2498.  
  2499.          All of the following are legitimate GOSUB's:
  2500.  
  2501.  ->         GOSUB LABEL         ; Direct LABEL name
  2502.  ->         GOSUB "LABEL"           ; Quoted LABEL name
  2503.  
  2504.          ASSIGN S0 "LABEL"       ; Assign label name to a string
  2505.          GOSUB S0             ; And goto the label in S0
  2506.  
  2507.          Note that you cannot GOSUB to a label in a file that has FCALLed
  2508.          the current file.    This includes ON ESCAPE GOSUB and ON SILENCE
  2509.          GOSUB conditions (see below).  The FCALLed file may however have
  2510.          a label that duplicates one in the caller's file.  In the latter
  2511.          case, the GOSUB transfers to the label in the FCALLed file.
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529. Version 2.7: 901015
  2530.  
  2531. COM-AND: IBM PC Communication Script Language                 Page  42
  2532.  
  2533.  
  2534. V.    Script Language Commands (continued)
  2535.  
  2536.  
  2537.  ->    GOTO <label>
  2538.  
  2539.          The GOTO statement unconditionally transfers control to the
  2540.          label specified in <string>.  If there is more than one <label>
  2541.          in the script file that matches <string> control is transfered
  2542.          to the one nearest the beginning of the script.  Example:
  2543.  
  2544.  ->         IF FAILURE          ; Test previous command execution
  2545.  ->        GOTO "ERROR"         ; Branch if it didn't work
  2546.  ->        ENDIF             ; End error test
  2547.          ...
  2548.  ->         ERROR:
  2549.  ->         EXIT             ; Terminate the script
  2550.  
  2551.          Note:  GOTO's may be used to transfer control out of an IF,
  2552.          CASE, DO, or WHILE clause.  However:  GOTO's should never be
  2553.          used to transfer control INTO one or the other clauses of an IF,
  2554.          CASE, DO or WHILE structure.  This warning includes transfer out
  2555.          of an IF clause into an enveloping IF clause.  "Unexpected
  2556.          ENDIF" or "Unexpected ENDCASE" error messages result from such
  2557.          practice.    For example:
  2558.  
  2559.          IF condition         ; Example of a nested IF
  2560.         ...
  2561.         IF condition
  2562.            GOTO SKIP_It      ; This is INVALID!!!  It branches
  2563.            ENDIF         ; .. into an IF clause out of one
  2564.         ...
  2565.          SKIP_It:             ; This label is within the outer IF
  2566.         ...             ;          !!! INVALID !!!
  2567.         ENDIF             ; End of outer IF
  2568.  
  2569.          Like the GOSUB statement, the operand of a GOTO statement may be
  2570.          a literal label, a quoted label, or a string variable containing
  2571.          the label as text.
  2572.  
  2573.          Note:  GOTO's may not be used to transfer control out of a
  2574.          subroutine.  "Stack overflows" will eventually be reported if
  2575.          this happens.
  2576.  
  2577.          Note:  GOTO's will not exit an FCALLed file to reach a label in
  2578.          a previous file (the caller or caller of caller).    The domain of
  2579.          labels used by GOTO is the current script file, and does not
  2580.          include calling files.
  2581.  
  2582.  
  2583.  
  2584. Version 2.7: 901015
  2585.  
  2586. COM-AND: IBM PC Communication Script Language                 Page  43
  2587.  
  2588.  
  2589. V.    Script Language Commands (continued)
  2590.  
  2591.  
  2592.  ->    HANGUP
  2593.  
  2594.          The HANGUP command terminates the modem connection (if connec-
  2595.          tion has been established).  It changes CONNECTED condition
  2596.          (tested with the IF statement, if true CD is enabled on the
  2597.          modem).  Example:
  2598.  
  2599.  ->         HANGUP             ; Disconnect:  we're done
  2600.  
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639. Version 2.7: 901015
  2640.  
  2641. COM-AND: IBM PC Communication Script Language                 Page  44
  2642.  
  2643.  
  2644. V.    Script Language Commands (continued)
  2645.  
  2646.  
  2647.  ->    IF [NOT] <condition> [<statement>]
  2648.  
  2649.          The IF statement tests a stated condition, and transfers control
  2650.          according to the result of the test.  The IF statement may carry
  2651.          the statement to be performed conditionally, or it may precede
  2652.          statements to be executed if the evaluation is true.
  2653.  
  2654.          In the latter case, and ONLY in that case (where the statements
  2655.          to be conditionally executed follow the IF statement), the
  2656.          script may include an optional ELSE clause, to be executed if
  2657.          the condition evaluated is found false.  The domain of this form
  2658.          of IF control is terminated with an ENDIF statement.
  2659.  
  2660.          This construction of the IF statements may be nested up to a
  2661.          maximum stack depth of 20 (with SWITCH DO, FOR, WHILE, and
  2662.          GOSUBs).  Example:
  2663.  
  2664.  ->         IF <condition>         ; Test condition
  2665.  ->        GOSUB "TRUE"         ; .. execute this if true
  2666.  ->         ELSE             ; Optional ELSE clause
  2667.  ->        GOSUB "FALSE"        ; .. execute this if condition false
  2668.  ->         ENDIF             ; End of IF
  2669.  
  2670.          An equally legitimate construction could be:
  2671.  
  2672.          IF <condition> GOSUB "TRUE"
  2673.          IF NOT <condition> GOSUB "FALSE"
  2674.  
  2675.          Or even:
  2676.  
  2677.  ->         IF <condition>         ; Test condition
  2678.  ->        GOSUB "TRUE"         ; .. execute this if true
  2679.          ELSE GOSUB "False"      ; ENDIF-less form
  2680.  
  2681.          Please note however, that the following construction is invalid.
  2682.  
  2683.          IF GOSUB "TRUE"         ; This statement allows NO ELSE or ENDIF
  2684.          ELSE GOSUB "False"      ; Therefore, this statement fails
  2685.  
  2686.  ->         IF conditions may be joined with AND, OR, and XOR within one
  2687.  ->         IF statement.  Parentheticization is also supported.  This
  2688.  ->         extension will be discussed below, after the conditions are
  2689.  ->         listed.
  2690.  
  2691.  
  2692.  
  2693.  
  2694. Version 2.7: 901015
  2695.  
  2696. COM-AND: IBM PC Communication Script Language                 Page  45
  2697.  
  2698.  
  2699. V.    Script Language Commands (continued)
  2700.  
  2701.  
  2702.  ->    IF <condition> (continued)
  2703.  
  2704.          The optional keyword NOT may precede the condition being tested
  2705.          to reverse its meaning.  IF conditions are:
  2706.  
  2707.          ALLOCATED         The ALLOCATED condition is true if dynamic var-
  2708.                  iables are currently allocated.
  2709.  
  2710.          ALPHA Sx         The ALPHA condition tests the first character
  2711.                  of the given string.  It is true if it finds
  2712.                  A-z or a-z.
  2713.  
  2714.  ->         CONNECTED         The CONNECTED condition is set and reset
  2715.                  according to the CD (carrier detect) of the
  2716.                  modem.  If your modem does not report true
  2717.                  CD, then this condition will not be reliable.
  2718.  
  2719.          CONTROL Sx      The CONTROL condition tests the first char-
  2720.                  acter of the given string.  It is true when
  2721.                  the character has a value less than 32 (' ').
  2722.  
  2723.          ERROR         The ERROR condition is set and reset by the
  2724.                  script processor after each command.  If the
  2725.                  command was syntactically or semantically
  2726.                  invalid, this condition is set.
  2727.  
  2728.  ->         EOF         The EOF condition is set and reset by the
  2729.                  last FGETS/FGETC/FREAD/READ statements.
  2730.  
  2731.  ->         HITKEY         The HITKEY condition is true if a keypress
  2732.                  is pending (it will not be read).    Note: Use
  2733.                  of this function suspends normal type-through
  2734.                  until a GET/MGET/ATGET/MATGET/KEYGET/KFLUSH
  2735.                  is performed, regardless of value returned.
  2736.  
  2737.                  Use of HITKEY may inhibit ESC termination!
  2738.  
  2739.  ->         FAILED         The FAILED condition is simply "NOT SUCCESS".
  2740.  
  2741.          FCALLED         The FCALLED condition tests if the current
  2742.                  script file was entered via an FCALL state-
  2743.                  ment (if is false unless an FRET is needed).
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749. Version 2.7: 901015
  2750.  
  2751. COM-AND: IBM PC Communication Script Language                 Page  46
  2752.  
  2753.  
  2754. V.    Script Language Commands (continued)
  2755.  
  2756.  
  2757.  ->    IF <condition> (continued)
  2758.  
  2759.          FIND Sx Sy [Nx] The FIND condition is actually a FIND per-
  2760.                  formed within the IF statement.  The syntax
  2761.                  and function are identical to the instruction.
  2762.  
  2763.          FKEY         The FKEY condition works in a fashion similar to
  2764.                  HITKEY.  FKEY waits for a function key (not an
  2765.                  ASCII key) to be pressed.    ASCII keystrokes are
  2766.                  typed-through (if TTHRU is on).
  2767.  
  2768.          FLAG [(#)]      The FLAG condition tests the current state
  2769.                  of flag number # (0-9).  Flags are set and
  2770.                  with the script instruction SET FLAG.
  2771.  
  2772.  ->         FOUND         The FOUND condition is set and reset by
  2773.                  the last FIND statement.
  2774.  
  2775.          FULL         The FULL condition works in a fashion similar to
  2776.                  XOFF.  FULL is true when COM-AND has XOFFed the
  2777.                  other side (SOFT flow control must therefore be
  2778.                  ON for this test to be of use).
  2779.  
  2780.          ISDLFILE Sx     The ISDLFILE condition is actually a ISDLFILE
  2781.                  performed within the IF statement.  The syntax
  2782.                  and function are identical to the instruction.
  2783.  
  2784.          ISFILE Sx         The ISFILE condition is actually a ISFILE
  2785.                  performed within the IF statement.  The syntax
  2786.                  and function are identical to the instruction.
  2787.  
  2788.          ISSCFILE Sx     The ISSCFILE condition is actually a ISSCFILE
  2789.                  performed within the IF statement.  The syntax
  2790.                  and function are identical to the instruction.
  2791.  
  2792.  ->         LINKED         The LINKED condition is true when the
  2793.                  script being executed was invoked from a
  2794.                  dialing directory entry.
  2795.  
  2796.  ->         MONO         The MONO condition is true if the CRT is
  2797.                  a monochrome monitor (mode 7).
  2798.  
  2799.          NULL Sx         The NULL condition tests the given string
  2800.                  and is true if the string is blank or null.
  2801.  
  2802.  
  2803.  
  2804. Version 2.7: 901015
  2805.  
  2806. COM-AND: IBM PC Communication Script Language                 Page  47
  2807.  
  2808.  
  2809. V.    Script Language Commands (continued)
  2810.  
  2811.  
  2812.  ->    IF <condition> (continued)
  2813.  
  2814.          NUMERIC Sx      The NUMERIC condition tests the first char-
  2815.                  acter of the given string.  It is true if it
  2816.                  finds one of the characters 0-9.
  2817.  
  2818.          PRINTER         The PRINTER condition tests for the printer
  2819.                  enabled through COM-AND (PRINTER ON!OFF).
  2820.  
  2821.          OVERLAY         The OVERLAY condition tests for the presence of
  2822.                  a machine language overlay file.
  2823.  
  2824.          RECEIVE         The RECEIVE condition tests for characters
  2825.                  pending on the comm port.    It is true if one
  2826.                  or more characters are ready to be read.
  2827.  
  2828.          SPECIAL Sx      The SPECIAL condition tests the first char-
  2829.                  acter of the given string.  It is true if the
  2830.                  character is not alpha, numeric or control.
  2831.  
  2832.          STRCMP Sx Sy    The STRCMP condition is actually a STRCMP
  2833.                  performed within the IF statement.  The syntax
  2834.                  and function are identical to the instruction.
  2835.  
  2836.  ->         SUCCESS         The SUCCESS condition is set and reset
  2837.                  according to the result of the last GETFILE,
  2838.                  SENDFILE, ISFILE, RGET, DOS, RUN, LOG OPEN,
  2839.                  FFIRST, FNEXT, FDATE, FTIME, FSIZE, FATTR,
  2840.                  RENAME, REWIND, DELETE and DIAL statements.
  2841.  
  2842.          TRACE         The TRACE condition tests the TRACE ON!OFF
  2843.                  status.
  2844.  
  2845.  ->         WAITFOR         The WAITFOR condition is set and reset
  2846.                  by the last WAITFOR statement.
  2847.  
  2848.          XOFF         The XOFF condition tests to determine if an XOFF
  2849.                  received from the host is currently pending.
  2850.                  SOFT flow control must be ON for this test.
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859. Version 2.7: 901015
  2860.  
  2861. COM-AND: IBM PC Communication Script Language                 Page  48
  2862.  
  2863.  
  2864. V.    Script Language Commands (continued)
  2865.  
  2866.  
  2867.  ->    IF <condition> (continued)
  2868.  
  2869.  ->         ZERO Nx         The ZERO condition must be qualified by a
  2870.                  numeric value/variable.  The condition is
  2871.                  true if the evaluation is 0.
  2872.  
  2873.                  Note: Expressions may be used in place of Nx,
  2874.                  if the expression is parentheticized.  For
  2875.                  example: "IF ZERO (N0-10)" is allowed.
  2876.  
  2877.  ->         <cc> Nx Ny      Numeric conditionals are expressed as <cc>
  2878.                  (where <cc> may be EQ, LT, GT, LE, GE, NE)
  2879.                  followed by two numeric values/variables.
  2880.                  IF LT N1 N2 is interpreted: IF N1 LT N2.
  2881.  
  2882.                  Note: "NE" is not ASPECT/PROCOMM compatible.
  2883.  
  2884.                  Note: An expressions may be used in place of Nx
  2885.                  or Ny, if the expression is parentheticized.
  2886.                  For example: "IF GT (N0-5) 25" is allowed.
  2887.  
  2888.          Nx <cc> Ny      COM-AND allows the normal comparison form to be
  2889.                  used, as well.  However, as conditional evalua-
  2890.                  tion allows parentheses, the first numeric ex-
  2891.                  pression DOES NOT allow parentheses.  Opening
  2892.                  parens of a conditional expression are taken to
  2893.                  apply to the conditional, not the numeric.  For
  2894.                  example:
  2895.                       IF (N10-2) eq 5    ; Always fails
  2896.                       IF N10-2 eq 5    ; Is fine
  2897.                       IF (N10-2 eq 5)    ; Is fine, too
  2898.  
  2899.  
  2900.          [Discussion continues on the next page.]
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914. Version 2.7: 901015
  2915.  
  2916. COM-AND: IBM PC Communication Script Language                 Page  49
  2917.  
  2918.  
  2919. V.    Script Language Commands (continued)
  2920.  
  2921.  
  2922.  ->    IF <condition> (continued)
  2923.  
  2924.          IF conditions may be joined with AND, OR, and XOR within one
  2925.          IF statement.  Parentheticization is also supported.  For
  2926.          example, the statement:
  2927.  
  2928.              IF NOT (FLAG(0) or FLAG(1)) and FLAG(2)
  2929.             ...
  2930.  ->            ENDIF
  2931.  
  2932.          AND's FLAG(2) with the negated result of an OR between FLAG(0)
  2933.          and FLAG(1).  All clauses are evaluated before the IF is per-
  2934.          formed.  In simpler words, FLAG(2) must be "on", AND both
  2935.          FLAG(1) and FLAG(0) must be "off".
  2936.  
  2937.          In the above example, the NOT applies to the result of the
  2938.          parenthetical "(FLAG(0) or FLAG(1))".  When NOT precedes a
  2939.          condition without parentheses it applies ONLY to that condi-
  2940.          tion.   For example the two fragments below are equivalent:
  2941.  
  2942.          IF NOT FLAG(0) and FLAG(1)  =   IF NOT FLAG(0)
  2943.         ...             =    IF FLAG(1)
  2944.  ->        ENDIF             =       ...
  2945.                      =       ENDIF
  2946.                      =    ENDIF
  2947.  
  2948.  ->    INC Nx
  2949.  
  2950.          The INC command performs the instruction:    Nx = Nx+1.  No error
  2951.          checking is performed;  should the value exceed the range of a
  2952.          numeric variable, results are unpredictable.  Example:
  2953.  
  2954.  ->         INC N1             ; N1 = N1+1
  2955.  
  2956.  ->    INIT Nx <number>
  2957.  
  2958.          The INIT statement assigns a value to a numeric variable just as
  2959.          ASSIGN assigns a value to a string variable.  Example:
  2960.  
  2961.  ->         INIT N5 5             ; Initialize N5
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969. Version 2.7: 901015
  2970.  
  2971. COM-AND: IBM PC Communication Script Language                 Page  50
  2972.  
  2973.  
  2974. V.    Script Language Commands (continued)
  2975.  
  2976.  
  2977.     INPUT Nx <address>
  2978.  
  2979.          The INPUT statement performs a machine level INPUT instruction
  2980.          using the address given.  WARNING: If you're not sure what a
  2981.          'machine level INPUT instruction' is... do not use this!
  2982.  
  2983.          INPUT N0 0x61         ; Read the speaker driver chip
  2984.  
  2985.     ISDLFILE <string>
  2986.  
  2987.          The ISDLFILE statement tests for the presence of a file named in
  2988.          <string> in the current download directory (see SET DLDIR).
  2989.          <String> must contain an unqualified file.ext, (it should not
  2990.          contain a fully pathed file name).  ISDLFILE sets the SUCCESS
  2991.          condition according to the presence of the named file.
  2992.          Example:
  2993.  
  2994.          ISDLFILE "COM-AND.EXE"  ; Is this file in download dir?
  2995.  
  2996.          Note that ISDLFILE may also be used with IF as the condi-
  2997.          tional test (e.g. IF ISDLFILE S0 ...).
  2998.  
  2999.  ->    ISFILE <string>
  3000.  
  3001.          The ISFILE statement tests for the presence of a file named in
  3002.          <string>.    <String> contains an unqualified file.ext (or may
  3003.          contain a fully pathed file name).  ISFILE sets the SUCCESS
  3004.          condition according to the presence of the named file.  Example:
  3005.  
  3006.  ->         ISFILE "COM-AND.EXE"    ; Is this file in current dir?
  3007.          ISFILE "D:\COM-AND\COM-AND.EXE"
  3008.  
  3009.          Note that ISFILE may also be used with IF as the condi-
  3010.          tional test (e.g. IF ISFILE S0 ...).
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024. Version 2.7: 901015
  3025.  
  3026. COM-AND: IBM PC Communication Script Language                 Page  51
  3027.  
  3028.  
  3029. V.    Script Language Commands (continued)
  3030.  
  3031.  
  3032.     ISSCFILE <string>
  3033.  
  3034.          The ISSCFILE statement tests for the presence of a potential
  3035.          script file named in <string> in the current directory and in
  3036.          the drive:subdirectory specified through the COM-AND= environ-
  3037.          ment variable.  <String> must contain an unqualified file.ext,
  3038.          (or may contain a fully pathed file name).  The SUCCESS
  3039.          condition is set according to the presence of the named file.
  3040.          Example:
  3041.  
  3042.          ISSCFILE "STCLOGON'     ; Is this file available?
  3043.  
  3044.          Note that ISSCFILE may also be used with IF as the condi-
  3045.          tional test (e.g. IF ISSCFILE S0 ...).
  3046.  
  3047.  ->    ITOA Nx Sx
  3048.  
  3049.          The ITOA statement converts a value in a numeric variable to a
  3050.          string variable.  The value is left justified, with leading
  3051.          zeroes suppressed.  Example:
  3052.  
  3053.          N0 = 0             ; N0 now contains 0
  3054.  ->         ITOA N0 S1          ; S1 now contains "0"
  3055.  
  3056.     ITOC Nx Sx[(#)]
  3057.  
  3058.          The ITOC statement converts a value to a single character (for
  3059.          non-ASCII values).  Only a single character is deposited, the
  3060.          low 8 bits of the value.  Example:
  3061.  
  3062.          N0 = 1             ; N0 now contains 1 (which is SOH)
  3063.          ITOC N0 S1          ; S1(0:0) now contains SOH
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079. Version 2.7: 901015
  3080.  
  3081. COM-AND: IBM PC Communication Script Language                 Page  52
  3082.  
  3083.  
  3084. V.    Script Language Commands (continued)
  3085.  
  3086.  ->    KEYGET Sx
  3087.  
  3088.          The KEYGET statement waits for and reads a single keystroke.
  3089.          The returned string is formatted so that the various possible
  3090.          keys are distinguishable.
  3091.  
  3092.          Printable ASCII keystrokes return one character in Sx.
  3093.  
  3094.          Non-printable ASCII keystrokes (e.g.  ESC) are returned as two
  3095.          hex digits (e.g.  ESC returns "1B").
  3096.  
  3097.          Special keys (function and cursor keys) are returned as four hex
  3098.          digits, the last two being '00'.  For example, the F1 key is
  3099.          returned as "3B00".  Example:
  3100.  
  3101.  ->         KEYGET S3             ; Read one keystroke
  3102.  
  3103.  ->    KFLUSH
  3104.  
  3105.          The KFLUSH statement flushes the keyboard of keystrokes.  It is
  3106.          intended for conditions where type-ahead is not appropriate
  3107.          (e.g.  under error conditions).  Example:
  3108.  
  3109.  ->         KFLUSH             ; Throw away key entry
  3110.  
  3111.     LD Sx <number>
  3112.  
  3113.          The LD command returns a long distance string from the dialing
  3114.          directory (or blanks).  A directory number may be specified
  3115.          (0,1,2,3,4 are allowed, 1="+",2="-",3="#",4="@", and 0 is a
  3116.          place holder).  Note the number field is not optional.  Example:
  3117.  
  3118.          LD S0 1                 ; Fetch the "+" string
  3119.  
  3120.     LEGEND <string>
  3121.  
  3122.          The LEGEND statement places the given text into the status line
  3123.          on the 25th line of the screen.  If <string> is blank, the
  3124.          status line reverts to COM-AND status line notes during script
  3125.          processing.  Example:
  3126.  
  3127.          LEGEND "Scripted host mode in effect: Press ESC to abort"
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134. Version 2.7: 901015
  3135.  
  3136. COM-AND: IBM PC Communication Script Language                 Page  53
  3137.  
  3138.  
  3139. V.    Script Language Commands (continued)
  3140.  
  3141.  
  3142.     LENGTH Sx Nx
  3143.  
  3144.          The LENGTH statement computes the current length of the string
  3145.          Sx (1,2,3...80) and places length in the numeric variable Nx.
  3146.          Example:
  3147.  
  3148.          S0 = "   "              ; Set-up a value
  3149.          LENGTH S0 N0         ; N0 should now contain 3
  3150.  
  3151.          Note that lengths range from 0 through 80, while character
  3152.          positions range from 0 through 79.
  3153.  
  3154.     LJ Sx
  3155.  
  3156.          The LJ command left justifies the contents of the given string
  3157.          variable (within its actual length).  Example:
  3158.  
  3159.          LJ S0                 ; Left justify
  3160.  
  3161.     LOAD (DIAL!MACR!ACCE!DEFA!ALLOC) <fname for DIAL/MACR/ACCE/ALLOC>
  3162.  
  3163.          The LOAD command loads a settings file (either the dialing
  3164.          directory, macro definition, accessory definition, defaults,
  3165.          or allocated variables).  Note that 'LOAD DIAL "name"' is
  3166.          equivalent to 'DLOAD "name"'.  MLOAD, ALOAD and RESET are
  3167.          similarly redefined.  Example:
  3168.  
  3169.          LOAD DIAL "com-and.dir"         ; Load original dial dir
  3170.          LOAD DEFAULT             ; Note: takes no file name
  3171.  
  3172.  ->    LOCATE <number> <number>
  3173.  
  3174.          The LOCATE statement positions the cursor to the row and
  3175.          optionally the column specified by the arguments.    The first
  3176.          argument is the row number (0-24, or 0-42).  The second number
  3177.          is the column number (0-79).  Note that a column argument
  3178.          requires a row argument.  Example:
  3179.  
  3180.  ->         LOCATE  0,0         ; Position to home (upper left)
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189. Version 2.7: 901015
  3190.  
  3191. COM-AND: IBM PC Communication Script Language                 Page  54
  3192.  
  3193.  
  3194. V.    Script Language Commands (continued)
  3195.  
  3196.  
  3197.  ->    LOG OPEN <string>
  3198.  ->    LOG CLOSE
  3199.  ->    LOG SUSPEND
  3200.  ->    LOG RESUME
  3201.     LOG MARKED (ON!OFF)
  3202.  
  3203.          The LOG subcommands OPEN a file for logging, CLOSE an open LOG
  3204.          file, SUSPEND logging, RESUME logging after suspension, and turn
  3205.          timestamp MARKing in the log on/off.
  3206.  
  3207.          The LOG OPEN command requires a file name in <string>.  <String>
  3208.          contains an unqualified file.ext (or may contain a fully
  3209.          pathed file name, not PROCOMM compatible).  Example:
  3210.  
  3211.  ->         LOG OPEN "Log.txt"      ; Open log file and start logging
  3212.          LOG OPEN "E:log.txt"    ; OPen log on RAM drive
  3213.  
  3214.          LOG OPEN sets the SUCCESS/FAILURE condition (tested with
  3215.          the IF statement).
  3216.  
  3217.     LOWER Sx
  3218.  
  3219.          The LOWER statement lower cases all alphabetic characters in Sx.
  3220.          Example:
  3221.  
  3222.          LOWER S5             ; Force all lower case
  3223.  
  3224.  ->    MACRO <number> [Sx]
  3225.  
  3226.          The MACRO statement will (1) transmit macro number 0-9 from the
  3227.          currently open Macro Definition file (Alt-M) or (2) deposit the
  3228.          macro string 0-9 into a string variable.  Example:
  3229.  
  3230.  ->         MACRO 8             ; Send macro #8, which winks
  3231.          MACRO 8 S0          ; Read macro #8 into a string variable
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244. Version 2.7: 901015
  3245.  
  3246. COM-AND: IBM PC Communication Script Language                 Page  55
  3247.  
  3248.  
  3249. V.    Script Language Commands (continued)
  3250.  
  3251.  
  3252.  ->    MANUAL <number>
  3253.  
  3254.          The MANUAL statement invokes an interactive window (i.e. as if
  3255.          in CRT mode, in response to an Alt'd Key).  The number operand
  3256.          is the scan code equivalent of the Alt'd or Function key that
  3257.          would invoke the window in interactive mode.  For example:
  3258.  
  3259.          MANUAL 0x2000          ; Invoke Alt-D
  3260.  
  3261.          The interactive window is terminated with ESCape (in all cases
  3262.          except Alt-F10).  The script author is refered to a list of
  3263.          extended keycodes for the operand.  Simply, however:
  3264.  
  3265.         ALT  Q,W,E,R,T,Y,U,I,O,P    -> 0x10 through 0x19
  3266.         ALT  A,S,D,F,G,H,J,K,L        -> 0x1E through 0x26
  3267.         ALT  Z,X,C,V,B,N,M        -> 0x2C through 0x32
  3268.         F1 through F10            -> 0x3B through 0x44
  3269.         ALT  1,2,3,4,5,6,7,8,9,0,-,=    -> 0x78 through 0x83
  3270.         PgUp, PgDn            -> 0x49, 0x51
  3271.  
  3272.          These values make the first two digits of the hex equivalent.
  3273.          The second two digits are always '00'.
  3274.  
  3275.  ->    MATGET row col attr len Sx
  3276.  
  3277.          The MATGET statement performs the MGET function, i.e.  reading
  3278.          the keyboard for a length with masked echo, with cursor
  3279.          positioning and color control.  Example:
  3280.  
  3281.  ->         MATGET 0 0 15 5 S5      ; Read up to 5 chars into S5 from 0,0
  3282.          MATGET 0 0 (black white) 5 S5
  3283.  
  3284.          Note that the cursor is left positioned after the last
  3285.          character read.
  3286.  
  3287.  ->    MDIAL <string>
  3288.  
  3289.          The MDIAL statement dials the number in <string> manually.  The
  3290.          value in <string> must be a valid (to the modem) telephone num-
  3291.          ber, and is limited to 14 characters width.  Example:
  3292.  
  3293.  ->         MDIAL "245-9110"        ; Dial P/Link direct
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299. Version 2.7: 901015
  3300.  
  3301. COM-AND: IBM PC Communication Script Language                 Page  56
  3302.  
  3303.  
  3304. V.    Script Language Commands (continued)
  3305.  
  3306.  
  3307.     MDIR <string>
  3308.  
  3309.          The MDIR statement creates a subdirectory specified as drive:
  3310.          path in the string operand.  MDIR performs exactly as the DOS
  3311.          MD command, succeeding and failing in exactly the same cases.
  3312.          MDIR sets SUCCESS or FAILURE according to the result.  Example:
  3313.  
  3314.          MDIR "A:\TEMP"             ; Create a temp subdir
  3315.  
  3316.  ->    MESSAGE <string>
  3317.  
  3318.          The MESSAGE statement displays a line of text on the local
  3319.          console.  If logging is enabled, the text is logged as well.
  3320.          Control characters (such as ^G, bell) are embedded in the usual
  3321.          manner.  No carriage return/line feed is issued with the
  3322.          <string> unless contained in <string>.  Example:
  3323.  
  3324.  ->         MESSAGE "^GDialing the SOURCE^M"
  3325.  
  3326.  ->    MGET Sx <number>
  3327.  
  3328.          The MGET statement works exactly as the GET statement, taking
  3329.          text from the keyboard (up to a carriage return or <number>
  3330.          length).  However, the echo is 'masked'.  Asterisks are echoed
  3331.          in place of the entry.  Example:
  3332.  
  3333.  ->         SET DUPLEX HALF         ; Turn off local echo
  3334.  ->         MESSAGE "^MEnter a password:"
  3335.  ->         MGET S0 15          ; Get up to 15 characters
  3336.  ->         TRANSMIT S0         ; Transmit the entry
  3337.  ->         TRANSMIT "^M"           ; And a cr to terminate
  3338.  ->         SET DUPLEX FULL         ; Turn echo back on
  3339.  
  3340.  ->    MLOAD <string>
  3341.  
  3342.          The MLOAD statement loads a new Macro Definition file (Alt-M).
  3343.          The MLOAD command requires a file name in <string>.  <String>
  3344.          contains an unqualified file.ext (or may contain a fully
  3345.          pathed file name).  Example:
  3346.  
  3347.  ->         MLOAD "COM-AND.MAC"           ; Load original macro def
  3348.          MLOAD "C:\SOURCE\COM-AND.MAC" ; Load special macros
  3349.  
  3350.          Note: The file name is limited to 27 characters in length.
  3351.  
  3352.  
  3353.  
  3354. Version 2.7: 901015
  3355.  
  3356. COM-AND: IBM PC Communication Script Language                 Page  57
  3357.  
  3358.  
  3359. V.    Script Language Commands (continued)
  3360.  
  3361.  
  3362.     MSR Nx
  3363.  
  3364.          The MSR command reads the modem status register and returns the
  3365.          8 bit value in a numeric register.  The format of the MSR will
  3366.          not be detailed here (refer to your modem's documentation).
  3367.          Example:
  3368.  
  3369.          MSR N0             ; Read the MSR
  3370.  
  3371.  ->    MUL Nx Ny Nz
  3372.  
  3373.          The MUL command performs the instruction:    Nz = Nx*Ny.  No error
  3374.          checking is performed;  should the value exceed the range of a
  3375.          numeric variable, results are unpredictable.  Example:
  3376.  
  3377.  ->         MUL N1 N2 N3         ; N3 = N1*N2
  3378.  
  3379.          An expression may be used for Nx or Ny if it is entirely
  3380.          contained within parentheses.
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409. Version 2.7: 901015
  3410.  
  3411. COM-AND: IBM PC Communication Script Language                 Page  58
  3412.  
  3413.  
  3414. V.    Script Language Commands (continued)
  3415.  
  3416.  
  3417.     Nx = <expression>
  3418.  
  3419.          Numeric expressions may be computed and assigned directly with
  3420.          the syntax "Nx = <expression>".  <Expression> is any legitimate
  3421.          algebraic statement.  For example:
  3422.  
  3423.          N0 = N1*(N2+N3)
  3424.          N0 = N5 = N1*(N2+N3)
  3425.  
  3426.          Values may be literal or numeric variables.  Operators are:
  3427.  
  3428.          "+", (addition),
  3429.          "-", (subtraction),
  3430.          "/", (division),
  3431.          "*", (multiplication),
  3432.          "\", (returns the remainder of division),
  3433.          "="  (store partial result)
  3434.          "~"  (bitwise complement),
  3435.          "&"  (bitwise AND),
  3436.          "|"  (bitwise OR),
  3437.          "^"  (bitwise XOR),
  3438.  
  3439.  
  3440.          Parentheses may be used to clarify ambiguous expressions (unless
  3441.          parentheses are used, the expression is evaluated from left to
  3442.          right), with the following precedences:
  3443.  
  3444.          "(",")"                 highest precedence
  3445.          "~", "&", "|", "^"      second precedence
  3446.          "*", "/" and "\"        third precedence
  3447.          "+" and "-"             fourth precedence
  3448.          "="                     lowest precedence
  3449.  
  3450.          Numeric variables may also be 'indexed'.  For example, N0[1] is
  3451.          N1, N1[1] is N2, and so on.  Arithmetic expressions are allowed
  3452.          as indices.  Indices may be used on either side of a store (e.g.
  3453.          "N0[N1] = N2[N3]").  An index does not 'wrap' (i.e.  N0[-1] is
  3454.          N0, not N99).
  3455.  
  3456.          Strings and substrings may be used if they contain valid numeric
  3457.          values.  A zero is used (and the ERROR flag is not set) if a
  3458.          string does not contain a valid numeric value.
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464. Version 2.7: 901015
  3465.  
  3466. COM-AND: IBM PC Communication Script Language                 Page  59
  3467.  
  3468.  
  3469. V.    Script Language Commands (continued)
  3470.  
  3471.  
  3472.     OUTPUT <address> Nx
  3473.  
  3474.          The OUTPUT statement performs a machine level OUTPUT instruction
  3475.          using the address given.  WARNING: If you're not sure what a
  3476.          'machine level OUTPUT instruction' is... do not use this!
  3477.  
  3478.          OUTPUT N0 0x61         ; Write the speaker driver chip
  3479.  
  3480.     ON ESCAPE GOSUB <label>
  3481.  
  3482.          The ON ESCAPE GOSUB statement specifies special action to be
  3483.          taken when the operator presses the ESC key.  If this is not
  3484.          set, the operator is prompted "Do you wish to terminate the
  3485.          script?".  The script writer may choose to intercept the ESC key
  3486.          with a subroutine for the special action.    Example:
  3487.  
  3488.          ON ESCAPE GOSUB ESCAPE  ; Subroutine label had best exist!
  3489.  
  3490.          Like the GOSUB statement, the operand of this statement may be a
  3491.          literal label, a quoted label, or a string variable containing
  3492.          the label as text.
  3493.  
  3494.          Note:  Giving the label as blank is equivalent to the statement
  3495.          ON ESCAPE CLEAR, below.  The ON ESCAPE label may be read (using
  3496.          the "_ONEScape" intrinsic), changed, and later reset to its
  3497.          previous condition, using this fact.
  3498.  
  3499.          Note:  WOPEN provides its OWN escape handler.  When WCLOSE is
  3500.          executed, the ON ESCAPE label previously holding is replaced.
  3501.          Therefore, ON ESCAPE used during a WOPEN sequence will have NO
  3502.          effect outside of the sequence.
  3503.  
  3504.          Note:  Although the ON ESCAPE label is NOT cleared upon FCALL,
  3505.          on FRETURN, the ON ESCAPE label holding at FCALL is replaced.
  3506.          Therefore, ON ESCAPE used during a FCALL will have NO effect
  3507.          outside of the FCALLed file.
  3508.  
  3509.     ON ESCAPE CLEAR
  3510.  
  3511.          The ON ESCAPE CLEAR statement clears a previous ON ESCAPE GOSUB
  3512.          setting.  After this statement, pressing the ESC key will result
  3513.          in the COM-AND prompt "Do you wish to terminate the script?".
  3514.          Example:
  3515.  
  3516.          ON ESCAPE CLEAR         ; Return to default condition
  3517.  
  3518.  
  3519. Version 2.7: 901015
  3520.  
  3521. COM-AND: IBM PC Communication Script Language                 Page  60
  3522.  
  3523.  
  3524. V.    Script Language Commands (continued)
  3525.  
  3526.  
  3527.     ON SILENCE GOSUB <label>
  3528.  
  3529.          The ON SILENCE GOSUB statement specifies special action to be
  3530.          taken after a <duration> of silence on the comm line.  The
  3531.          <duration> defaults to 300 seconds (5 min), and may be set with
  3532.          the SET SILENCE command.
  3533.  
  3534.          ON SILENCE GOSUB Disconn ; Subroutine label had best exist!
  3535.  
  3536.          Like the GOSUB statement, the operand of this statement may be a
  3537.          literal label, a quoted label, or a string variable containing
  3538.          the label as text.
  3539.  
  3540.          Note:  The script must allow the comm port to be read... with
  3541.          one of the following: RGET, or PAUSE.  Note that SUSPEND super-
  3542.          cedes the ON SILENCE condition.
  3543.  
  3544.          Note:  When the GOSUB is executed, the ON SILENCE trap is turned
  3545.          off.  If it is to be used again, a new ON SILENCE GOSUB must be
  3546.          performed (best in the subroutine itself).
  3547.  
  3548.          Note:  The ON SILENCE command 'primes' the timer.  Therefore, a
  3549.          loop containing ON SILENCE... will never timeout!    The timer
  3550.          will be continuously reset.
  3551.  
  3552.     ON SILENCE CLEAR
  3553.  
  3554.          The ON SILENCE CLEAR statement clears a previous ON SILENCE
  3555.          setting.  After this statement, the comm port is not tested
  3556.          for silence.  Example:
  3557.  
  3558.          ON SILENCE CLEAR         ; Return to default condition
  3559.  
  3560.     OVERLAY <file name>         ; Load a file for use
  3561.     OVERLAY CLEAR             ; Clear a loaded file
  3562.  
  3563.          The OVERLAY statement loads an EXE or COM format file as machine
  3564.          language subroutines for COM-AND scripts.    Routines are invoked
  3565.          in the overlay with the SCALL statement.  Example:
  3566.  
  3567.          OVERLAY "talker.ovl"    ; Load voice synth routines
  3568.  
  3569.          The OVERLAY statement sets SUCCESS/FAIL according to the result
  3570.          of the attempt.  Refer to Appendix K for more discussion.
  3571.  
  3572.  
  3573.  
  3574. Version 2.7: 901015
  3575.  
  3576. COM-AND: IBM PC Communication Script Language                 Page  61
  3577.  
  3578.  
  3579. V.    Script Language Commands (continued)
  3580.  
  3581.  
  3582.  ->    PAUSE [<number>]
  3583.  
  3584.          The PAUSE statement pauses the script file for a given number of
  3585.          seconds.  The delay period defaults to 60 seconds, but may be
  3586.          explicitly set with the numeric argument.    Text received during
  3587.          the PAUSE period is displayed on the CRT, and analyzed for WHEN
  3588.          triggers.    Example:
  3589.  
  3590.  ->         PAUSE 300             ; Pause for 5 minutes
  3591.  
  3592.     PERFORM <string>
  3593.  
  3594.          The PERFORM statement executes the given string as a command.
  3595.          Self modifying code is not recommended, but remote control of
  3596.          COM-AND is easily implemented with this command.  Example:
  3597.  
  3598.          S0 = "EXIT"             ; Place a command in S0
  3599.          PERFORM S0          ; Execute S0 as a command
  3600.  
  3601.     PLAY <string>
  3602.  
  3603.          The PLAY statement plays the BASIC encoded music statement in
  3604.          <string>.    The ERROR condition is set if the string cannot be
  3605.          parsed (and is therefore not sounded).  Refer to the appendices
  3606.          for the syntax of the play statement.  Example:
  3607.  
  3608.          PLAY "t220 l8 edcdeee2 ddd2 egg2 edcdeee2 ed.d8edc1"
  3609.  
  3610.     PRESERVE Sx
  3611.  
  3612.          When a value is received (either RGET, GET or MGET), it may
  3613.          contain '!'s and '^'s that would be interpreted as special
  3614.          characters ('!' = carriage return, and '^' = control).  The
  3615.          PRESERVE command, applied to a received string variable will
  3616.          modify the value so that a subsequent TRANSMIT or MESSAGE
  3617.          command sends exactly what was received.  Example:
  3618.  
  3619.          SET RDISPLAY OFF         ; Turn off display of rec'd characters
  3620.  ->         RGET S9             ; Read the comm line
  3621.  ->         IF SUCCESS          ; If not a timeout
  3622.         PRESERVE S9         ; Modify to preserve values
  3623.  ->        MESSAGE S9         ; Display on console
  3624.  ->        MESSAGE "^M"         ; And a carriage rtn
  3625.  ->        ENDIF
  3626.  
  3627.  
  3628.  
  3629. Version 2.7: 901015
  3630.  
  3631. COM-AND: IBM PC Communication Script Language                 Page  62
  3632.  
  3633.  
  3634. V.    Script Language Commands (continued)
  3635.  
  3636.  
  3637.     PRINT <string>
  3638.  
  3639.          The PRIN command sends the <string> to the LP1 logging device.
  3640.          The usual string edits are performed first;  however, unlike
  3641.          MESSAGE, no line advance is performed first.
  3642.  
  3643.          The PRINT command ignores the setting of the PRINTER ON!OFF
  3644.          (Ctl-PrtSc) state;  it prints regardless.    Printer error aborts
  3645.          the line, but the next PRINT command is not disabled.  Example:
  3646.  
  3647.          PRINT "^L"              ; Send a top-of-form
  3648.  
  3649.  ->    PRINTER (ON!OFF)
  3650.  
  3651.          The PRINTER command turns on and off the local LP1 logging of
  3652.          received (and echoed) text.
  3653.  
  3654.  ->    QUIT
  3655.  
  3656.          The QUIT command terminates the script execution and COM-AND.
  3657.          It may be coded at any level (for example within a subroutine
  3658.          reached through a call from a subroutine).  Example:
  3659.  
  3660.  ->         QUIT             ; Terminate the script and program
  3661.          ; Nothing past this point in the script will be performed.
  3662.  
  3663.          Note also the BYE command.
  3664.  
  3665.  
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684. Version 2.7: 901015
  3685.  
  3686. COM-AND: IBM PC Communication Script Language                 Page  63
  3687.  
  3688.  
  3689. V.    Script Language Commands (continued)
  3690.  
  3691.  
  3692.     RDIR <string>
  3693.  
  3694.          The RDIR statement removes a subdirectory specified as drive:
  3695.          path in the string operand.  RDIR performs exactly as the DOS
  3696.          RD command, succeeding and failing in exactly the same cases.
  3697.          RDIR sets SUCCESS or FAILURE according to the result.  Example:
  3698.  
  3699.          RDIR "A:\TEMP"             ; Remove a temp subdir
  3700.  
  3701.     READ Sx Nx Ny
  3702.  
  3703.          The READ command reads a string (up to Nx characters) into a
  3704.          string variable.  The input file must be opened by FOPENI.
  3705.          READ reads up to 80 characters into Sx.  If the input file was
  3706.          opened in TEXT mode, the read string terminates at the 80th byte
  3707.          or at a CR/LF pair (NOT placed in Sx as a single CR).  The count
  3708.          read is placed in Ny.  Example:
  3709.  
  3710.          READ S0 80 N4         ; Read 80 bytes; count read in N4
  3711.  
  3712.          In TEXT mode, the READ function terminates when a CR/LF is en-
  3713.          countered.  In TEXT mode, tabs are expanded to blanks.  In TEXT
  3714.          mode, the READ command stops on an ASCII EOF character (Ctl-Z)
  3715.          as well as on true end-of-file (size).
  3716.  
  3717.          In TEXT mode, when an empty record is encountered (i.e. CR/LF),
  3718.          the returned length is 0 and the returned buffer is empty.  When
  3719.          a record longer than 80 characters is encountered, the first
  3720.          READ returns a length of 80 and subsequent READ statement(s)
  3721.          return the remainder of the record.  Special note should be made
  3722.          of cases where a length of 80 exactly is returned.  Should the
  3723.          next READ return a length of 0, the record was 80 text charac-
  3724.          ters, and the 0 length record represents the record's CR/LF.
  3725.  
  3726.          The READ command sets the EOF condition on input EOF.  This may
  3727.          be tested with an 'IF EOF'.  On EOF the buffer is returned null.
  3728.  
  3729.     RENAME <oldfile> <newfile>
  3730.  
  3731.          The RENAME statement renames a file named in the command.    The
  3732.          SUCCESS flag is set according to the result of the command.
  3733.          Example:
  3734.  
  3735.          RENAME "COM-AND.LOG" "COM-AND.OLD"
  3736.  
  3737.  
  3738.  
  3739. Version 2.7: 901015
  3740.  
  3741. COM-AND: IBM PC Communication Script Language                 Page  64
  3742.  
  3743.  
  3744. V.    Script Language Commands (continued)
  3745.  
  3746.  
  3747.     RESET
  3748.  
  3749.          The RESET statement restores default settings (Alt-S, Alt-O, and
  3750.          Alt-P) to their load-time values.    It also restores the default
  3751.          download subdirectory.  It does not reset the current subdirec-
  3752.          tory or the scrolling region coordinates.    Example:
  3753.  
  3754.          RESET             ; Restore default parameters
  3755.  
  3756.     RESTORE
  3757.  
  3758.          The RESTORE statement restores an area saved by the SAVE
  3759.          statement.  The coordinates used by the SAVE statement are
  3760.          implicit to the RESTORE statement.  The RESTORE statement sets
  3761.          the SUCCESS flag according to save-stack underflow.
  3762.  
  3763.          RESTORE             ; Restore saved area
  3764.  
  3765.  ->    RETURN
  3766.  
  3767.          The RETURN command transfers control of the script processor to
  3768.          the last GOSUB executed.  RETURN effectively cancels the domain
  3769.          of any IF or SWITCH statement being processed.  The RETURN may
  3770.          be coded at any level (for example within an IF).    Example:
  3771.  
  3772.  ->         LABEL:
  3773.          ...
  3774.  ->         RETURN             ; Return to caller
  3775.  
  3776.     REWIND
  3777.  
  3778.          The REWIND statement rewinds the input file (if open).  The
  3779.          SUCCESS flag is set according to the result of the command.
  3780.          Example:
  3781.  
  3782.          REWIND             ; REWIND the input file
  3783.  
  3784.  ->    RFLUSH
  3785.  
  3786.          The RFLUSH command flushes the receiver buffer of received text.
  3787.          Text being flushed is not displayed at the CRT.  Example:
  3788.  
  3789.  ->         RFLUSH             ; Flush anything left over
  3790.  ->         HANGUP             ; Disconnect the call
  3791.  
  3792.  
  3793.  
  3794. Version 2.7: 901015
  3795.  
  3796. COM-AND: IBM PC Communication Script Language                 Page  65
  3797.  
  3798.  
  3799. V.    Script Language Commands (continued)
  3800.  
  3801.  
  3802.  ->    RGET Sx [<number> [<number>]]
  3803.  
  3804.          The RGET command reads the comm port for text.  Received text is
  3805.          terminated by a carriage return (in RMODE ASCII), or, if the
  3806.          optional first numeric argument was supplied, after <number>
  3807.          characters.  Receipt may also be terminated after a stated or
  3808.          unstated period of time (default is 60 seconds; the value may be
  3809.          changed with the optional second numeric argument).  Example:
  3810.  
  3811.  ->         RGET S0 24 300          ; Wait up to 5 mins for 24 characters
  3812.  
  3813.          Note that the delay interval cannot be specified without the
  3814.          first numeric argument (length) also present.
  3815.  
  3816.          Note that if WHEN triggers are to be performed during an RGET,
  3817.          the RGET length must be greater than the largest WHEN trigger
  3818.          string.
  3819.  
  3820.          RGET sets the SUCCESS/FAILURE condition (which may then be
  3821.          tested with the IF statement).
  3822.  
  3823.          RGET will read in either an ASCII or BINARY mode.    Its default
  3824.          is ASCII.    In ASCII mode, nulls and linefeeds are ignored,
  3825.          carriage returns end the RGET, and backspaces are performed.  In
  3826.          binary mode, the RGET is terminated only by length.  The RGET
  3827.          mode is set with the SET RMODE statement.
  3828.  
  3829.     RJ Sx
  3830.  
  3831.          The RJ command right justifies the contents of the given string
  3832.          variable (within its actual length).  Example:
  3833.  
  3834.          RJ S0                 ; Right justify
  3835.  
  3836.     RND <modulus> Nx
  3837.  
  3838.          The RND command computes a random number (smaller than the given
  3839.          modulus value) and places the value in Nx.  Example:
  3840.  
  3841.          RND 6 N0             ; Roll one six faced die (n0 = 0 to 5)
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.  
  3848.  
  3849. Version 2.7: 901015
  3850.  
  3851. COM-AND: IBM PC Communication Script Language                 Page  66
  3852.  
  3853.  
  3854. V.    Script Language Commands (continued)
  3855.  
  3856.  
  3857.  ->    RUN <string> [WAIT]
  3858.  
  3859.          The RUN command executes any executable program that may be
  3860.          loaded 'on top of' COM-AND.  The RUN command will not work if
  3861.          there is not sufficient memory to load the new program.
  3862.  
  3863.          Parameters may be passed to the new program by including
  3864.          them after the file name.    Example:
  3865.  
  3866.  ->         RUN "VCOLIB.EXE"             ; Load VCOLIB (menu mode)
  3867.          RUN "VCOLIB.EXE L GENIE.FLB" ; Load and list to CRT
  3868.  
  3869.          The optional keyword WAIT signals that COM-AND is to pause
  3870.          after completion for a keypress before the script continues.
  3871.  
  3872.          This command sets the SUCCESS condition according to the error
  3873.          level returned to DOS by the target program.
  3874.  
  3875.          NOTE:  The screen is saved prior to the RUN function, for
  3876.          restoration upon completion.  However, the screen size saved
  3877.          is defined by the DWINDOW currently in effect!
  3878.  
  3879.     SAVE row col row col
  3880.  
  3881.          The SAVE statement saves an area of screen on a stack.  The
  3882.          first and second arguments specify the row/column of the
  3883.          top-left of the region.  The third and fourth arguments specify
  3884.          the row/column of the bottom-right of the region.    Up to 20
  3885.          regions may be saved at one time.    The SUCCESS flag is set/reset
  3886.          according to save-stack overflow.    Example:
  3887.  
  3888.          SAVE 0 10,10 20,20       ; Save a narrow box.
  3889.  
  3890.     SCALL <addr> [parms [,parms]]
  3891.  
  3892.          The SCALL instruction invokes a procedure in an overlay.  The
  3893.          address of the procedure (relative to the first 64K) must be
  3894.          supplied.    Optional numeric (nx) and string (Sx, Vx) variables
  3895.          may be listed after the mandatory address.  All parameters are
  3896.          passed by reference and may therefore be modified by the over-
  3897.          lay routine.  For example:
  3898.  
  3899.          SCALL 3 N0            ; Invoke proc at addr 3, pass/rtn N0
  3900.  
  3901.  
  3902.  
  3903.  
  3904. Version 2.7: 901015
  3905.  
  3906. COM-AND: IBM PC Communication Script Language                 Page  67
  3907.  
  3908.  
  3909. V.    Script Language Commands (continued)
  3910.  
  3911.  
  3912.     SCREEN row col row col attr Sx
  3913.  
  3914.          The SCREEN statement provides for a multi-line display within
  3915.          an area on the screen.  The leftmost column and the number of
  3916.          lines to be be displayed are defined by the box coordinates.
  3917.          The color attribute is used on each line displayed.  Lines are
  3918.          displayed string with the string variable given, and proceeding
  3919.          in sequence.  For example:
  3920.  
  3921.          SCREEN 10,10 20,20 (black white) S0
  3922.  
  3923.          displays 11 lines from variables S0 through S10.  Note that the
  3924.          given attribute ONLY applies to text written (not the whole box)
  3925.          and that the box width does NOT limit the line length displayed.
  3926.  
  3927.  ->    SCROLL cnt row col row col attr
  3928.  
  3929.          The SCROLL statement scrolls a region on the screen, filling the
  3930.          new lines with the specified color.  The first argument <cnt>
  3931.          specifies the number of lines to scroll (0 implies that the
  3932.          region is to be cleared).    The second and third arguments
  3933.          specify the row/column of the top-left of the region.  The
  3934.          fourth and fifth arguments specify the row/column of the
  3935.          bottom-right of the region.  The last argument specifies the
  3936.          color attribute to be used on the new line.  Example:
  3937.  
  3938.  ->         SCROLL 0 10,10 20,20 15         ; White on black:    narrow box
  3939.          SCROLL 0 10,10 20,20 (black white)
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.  
  3958.  
  3959. Version 2.7: 901015
  3960.  
  3961. COM-AND: IBM PC Communication Script Language                 Page  68
  3962.  
  3963.  
  3964. V.    Script Language Commands (continued)
  3965.  
  3966.  
  3967.  ->    SENDFILE ASCII      <string>    ; A.K.A. Buffer capture
  3968.  ->    SENDFILE BYMODEM  <string>    ; Batch YMODEM
  3969.  ->    SENDFILE BYMODEMG <string>    ; Batch YMODEM-G (BYMOG works too)
  3970.  ->    SENDFILE CISB              ; CompuServe B-protocol
  3971.  ->    SENDFILE KERMIT   <string>    ; Kermit or SuperKermit
  3972.     SENDFILE QUICKB           ; CompuServe Quick B-protocol
  3973.  ->    SENDFILE RXMODEM  <string>    ; Relaxed CRC or Checksum XMODEM
  3974.  ->    SENDFILE WXMODEM  <string>    ; Windowed XMODEM
  3975.  ->    SENDFILE XMODEM   <string>    ; CRC or Checksum XMODEM
  3976.  ->    SENDFILE YMODEM   <string>    ; Simple YMODEM (not True ... (TM))
  3977.     SENDFILE ZMODEM   <string>    ; ZMODEM transfer (batch)
  3978.  
  3979.          The SENDFILE statement initiates an upload using a specific
  3980.          protocol.    The <string> argument must specify a valid file name,
  3981.          and the file must exist.  The SENDFILE command sets the SUCCESS
  3982.          condition according to the transfer.  Example:
  3983.  
  3984.  ->         SENDFILE XMODEM "Com-and.arc"  ; Upload
  3985.  
  3986.          Note that, in the case of CISB and QUICKB, you tell the host the
  3987.          name the file will take on your machine.
  3988.  
  3989.          Note that CIS-B ( and QuickB) provide an automated upload
  3990.          function.    The automated function is NOT available within a
  3991.          script unless the script is 'reading the port', i.e.  with an
  3992.          RGET, PAUSE or SUSPEND statement.
  3993.  
  3994.  ->    SET <command...>
  3995.  
  3996.          The SET commands are discussed below in a chapter alone.
  3997.  
  3998.  ->    SHELL
  3999.  
  4000.          The SHELL command shell's to DOS using COMMAND.COM or the
  4001.          command line interpretor indicated by the 'COMSPEC=' envi-
  4002.          ronment variable.    Having shelled to DOS, DOS commands may be
  4003.          executed...  however, the shell must be exited for the script to
  4004.          continue.    COMMAND.COM is exited with the command "Exit".
  4005.          Example:
  4006.  
  4007.  ->         SHELL             ; shell to DOS
  4008.  
  4009.          NOTE: The screen is saved prior to the SHELL function, for
  4010.          restoration upon completion.  However, the screen size saved
  4011.          is defined by the DWINDOW currently in effect!
  4012.  
  4013.  
  4014. Version 2.7: 901015
  4015.  
  4016. COM-AND: IBM PC Communication Script Language                 Page  69
  4017.  
  4018.  
  4019. V.    Script Language Commands (continued)
  4020.  
  4021.  
  4022.     SNAME Sx
  4023.  
  4024.          The SNAME command returns the current script file name in the
  4025.          variable given.  Example:
  4026.  
  4027.          SNAME S0             ; shell to DOS
  4028.  
  4029.          This function is provided to make it possible for a script that
  4030.          has been 'EXECUTE'd from another script file to return to the
  4031.          original script.  Note that when a script is started, all string
  4032.          variables are set to blank.  When a script is 'EXECUTE'd string
  4033.          variables retain their current values.
  4034.  
  4035.  ->    SOUND <number> <number>
  4036.  
  4037.          The SOUND statement generates a sound of a specific frequency
  4038.          for a duration specified in milliseconds.    The first argument is
  4039.          the frequency (in Hz).  The second argument is duration.  Both
  4040.          may be specified as literal values or as variables.  Example:
  4041.  
  4042.  ->         SOUND 440 500         ; Sound a 'A' for half-a-sec
  4043.  
  4044.     SSIZE Nx
  4045.  
  4046.          The SSIZE statement returns the current # of screen lines
  4047.          in the given numeric variable.  Example:
  4048.  
  4049.          SSIZE N0             ; Compute # screen lines
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069. Version 2.7: 901015
  4070.  
  4071. COM-AND: IBM PC Communication Script Language                 Page  70
  4072.  
  4073.  
  4074. V.    Script Language Commands (continued)
  4075.  
  4076.  
  4077.     STACK <string>
  4078.     STACK CLEAR
  4079.  
  4080.          The STACK statement stores the given string (if there is room)
  4081.          in the BIOS keyboard buffer.  STACK CLEAR clears the BIOS
  4082.          keyboard buffer.  STACK may be used prior to BYE to effect a
  4083.          chain to another program.    For example:
  4084.  
  4085.          STACK "PC-VCO!"         ; Stack cmd to load PC-VCO
  4086.  ->         BYE             ; Exit COM-AND without hanging up
  4087.  
  4088.          Note that STACK, like HITKEY, sets a state inhibiting type-
  4089.          through until the next KEYGET/GET/MGET/ATGET/MATGET/KFLUSH.
  4090.  
  4091.          To STACK a non-ASCII key, preceded the 'extended code' with null
  4092.          (^@).  Please refer to Appendix H of this document for a table
  4093.          of extended keycodes as used by the STACK command.
  4094.  
  4095.          Note that the STACK command uses the EBL keyboard stack, if EBL
  4096.          is available.  Refer to Appendix (F) below covering EBL for
  4097.          information on EBL.
  4098.  
  4099.          The BIOS keyboard buffer is limited to 15 characters.  The EBL
  4100.          provides a larger buffer for STACK's use.  [Note that various
  4101.          utilities and TSRs may provide a larger keyboard buffer.  If so,
  4102.          COM-AND will use the larger buffer.]
  4103.  
  4104.     STORE (DIAL!MACR!ACCE!DEFA!ALLOC) [parms]
  4105.  
  4106.          The STORE command writes a settings file (either the dialing
  4107.          directory, macro definition, accessory definition, defaults, or
  4108.          allocated variables).  Note that 'STORE DEFAULTS' is equivalent
  4109.          to 'UPDATE'.  Example:
  4110.  
  4111.          STORE DIAL              ; Update original dial dir
  4112.          STORE DEFAULT             ; Note: takes no file name
  4113.  
  4114.          The only STORE subcommand taking a parameter is STORE ALLOCATED.
  4115.          The other statements store to the file currently in use.  STORE
  4116.          ALLOCATED (storing allocated variables to a disk file) requires
  4117.          a specific file name for the store.
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124. Version 2.7: 901015
  4125.  
  4126. COM-AND: IBM PC Communication Script Language                 Page  71
  4127.  
  4128.  
  4129. V.    Script Language Commands (continued)
  4130.  
  4131.  
  4132.  ->    STRCAT Sx Sy
  4133.  
  4134.          The STRCAT statement concatenates two strings, Sy onto Sx.  The
  4135.          concatenation occurs after the last character of Sx.  Example:
  4136.  
  4137.  ->         STRCAT S0 S1         ; Concat S1 onto S0
  4138.          STRCAT S0 S1(5:10)      ; Extract substring of S1 and add
  4139.  
  4140.          Note that the command above is equivalent to the following:
  4141.  
  4142.          CONCAT S0 * S1         ; Another way to say this
  4143.  
  4144.  ->    STRCMP Sx Sy
  4145.  
  4146.          The STRCMP statement compares two strings (case sensitive) and
  4147.          sets the SUCCESS flag if they are identical.  Example:
  4148.  
  4149.  ->         STRCMP S0 S1         ; Compare strings in S0 & S1
  4150.  ->         IF SUCCESS          ; IF they are equal...
  4151.         ...             ; ...
  4152.  
  4153.          Note that STRCMP may also be used with IF as the conditional
  4154.          test (e.g. IF STRCMP S0 S1 ...).
  4155.  
  4156.  ->    STRCPY Sx <string>
  4157.  
  4158.          The STRCPY statement assigns the value in <string> to Sx.    It is
  4159.          equivalent to the ASSIGN statement.  Example:
  4160.  
  4161.  ->         STRCPY  S0 S1         ; S0 = S1, or ASSIGN S0 S1
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179. Version 2.7: 901015
  4180.  
  4181. COM-AND: IBM PC Communication Script Language                 Page  72
  4182.  
  4183.  
  4184. V.    Script Language Commands (continued)
  4185.  
  4186.  
  4187.  ->    STRFMT Sx <fmtstr> <parms>
  4188.  
  4189.          The STRFMT statement formats variables (and literals) into a
  4190.          template and places the result into a string variable.  The
  4191.          argument <fmtstr> above is the formatting template.  The
  4192.          argument list <parms> above is a list of variable names (and
  4193.          literals and substrings) to be formatted.    Example:
  4194.  
  4195.  ->         STRFMT S0 "The answer is %d %s" N1 S1
  4196.  
  4197.          In the above example, the value in N1 replaces %d and the text
  4198.          in S1 replaces %s.  Format specifiers in the template have the
  4199.          form:
  4200.  
  4201.              %[<flags>][<width>][.<precision>]<type>
  4202.  
  4203.          <Flags>         are "-" meaning left justify the argument and
  4204.                  "+" meaning display the argument with a plus
  4205.                  or minus sign (if numeric).  The defaults are
  4206.                  right justified and signed only if negative.
  4207.  
  4208.          <width>         specifies the minimum number of characters to
  4209.                  be displayed.  If <width> is greater than the
  4210.                  value, blanks are added to the left or right
  4211.                  (according to the justification).    If <width>
  4212.                  is prefixed by 0, 0's are used in place of
  4213.                  blanks.
  4214.  
  4215.          .<precision>    specifies the minimum number of digits to be
  4216.                  displayed.  0's are added to the left of the
  4217.                  formatted value to achieve <precision>.
  4218.  
  4219.          <type>         "d" specifies decimal numeric values (signed)
  4220.                  "u" specifies unsigned decimal values
  4221.                  "x" specifies hex values
  4222.                  "s" specifies string values
  4223.  
  4224.  
  4225.          The <fmtstr> is scanned from left to right for format
  4226.          specifiers.  As specifiers are found, parameters after <fmtstr>
  4227.          are extracted and used sequentially.  This usage is similar to
  4228.          the Microsoft "C" compiler's usage.
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234. Version 2.7: 901015
  4235.  
  4236. COM-AND: IBM PC Communication Script Language                 Page  73
  4237.  
  4238.  
  4239. V.    Script Language Commands (continued)
  4240.  
  4241.  
  4242.  ->    SUB Nx Ny Nz
  4243.  
  4244.          The SUB command performs the instruction:    Nz = Nx-Ny.  No error
  4245.          check is performed;  should the value exceed the range of a
  4246.          numeric variable, results are unpredictable.  Example:
  4247.  
  4248.  ->         SUB N1 N2 N3         ; N3 = N1-N2
  4249.  
  4250.          An expression may be used for Nx or Ny if it is entirely
  4251.          contained within parentheses.
  4252.  
  4253.     SUBDIR Sx
  4254.  
  4255.          The SUBDIR statement stores the current default drive:sub-
  4256.          directory into the target variable.  Example:
  4257.  
  4258.          SUBDIR S0             ; Get current drive:path
  4259.  
  4260.  ->    SUBSTR Sx Sy <number> <number>
  4261.  
  4262.          The SUBSTR statement extracts a substring from Sy and places it
  4263.          in Sx.  The beginning character position is specified by the
  4264.          first numeric argument (0,1,2...).  The second numeric argument
  4265.          specifies the length of the substring.  Example:
  4266.  
  4267.  ->         SUBSTR S0 S1 5 10          ; S0 = S1 at 5 for 10
  4268.  
  4269.          Note that the command above is equivalent to the following:
  4270.  
  4271.          S0 = S1(5:14)         ; Another way to say this
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.  
  4289. Version 2.7: 901015
  4290.  
  4291. COM-AND: IBM PC Communication Script Language                 Page  74
  4292.  
  4293.  
  4294. V.    Script Language Commands (continued)
  4295.  
  4296.  
  4297.     SUSPEND FOR <number> <number>
  4298.  ->    SUSPEND UNTIL <number> <number>
  4299.  
  4300.          The SUSPEND FOR statement suspends COM-AND for the duration
  4301.          indicated (in military form).  The suspension may be up to 24
  4302.          hours.  The first argument is hours (0-23) and the second
  4303.          argument is minutes.  Example:
  4304.  
  4305.          SUSPEND FOR 0 30         ; Wait a-haffa hour
  4306.  
  4307.          The SUSPEND UNTIL statement suspends COM-AND until the time
  4308.          indicated (in military form).  Example:
  4309.  
  4310.  ->         SUSPEND UNTIL 4 30      ; 4:30 AM
  4311.  
  4312.          Incoming text received during SUSPEND is displayed on the
  4313.          screen.  Keystrokes are transmitted.  The SUSPEND may be
  4314.          terminated with the ESC key.  WHEN is active during SUSPEND.
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344. Version 2.7: 901015
  4345.  
  4346. COM-AND: IBM PC Communication Script Language                 Page  75
  4347.  
  4348.  
  4349. V.    Script Language Commands (continued)
  4350.  
  4351.  
  4352.  ->    SWITCH (Sx!Nx)
  4353.  
  4354.          The SWITCH statement declares a variable to be tested and a
  4355.          domain for transfer of control.  A SWITCH statement must be
  4356.          followed an ENDSWITCH statement.  Lines between the SWITCH and
  4357.          the ENDSWITCH statements are the domain of the SWITCH function.
  4358.  
  4359.          Within the SWITCH domain, CASE statements test the given
  4360.          variable for a value (not case sensitive).  If a match is
  4361.          obtained, the statements following the CASE statement are
  4362.          executed until an ENDCASE is encountered.
  4363.  
  4364.          A DEFAULT statement specifies a clause to be executed if none of
  4365.          the prior CASEs have been executed.  The DEFAULT clause is
  4366.          terminated by an ENDCASE;    just as a CASE statement.
  4367.  
  4368.          Schematically:
  4369.  
  4370.  ->         SWITCH (Sx!Nx)             ; Set variable to be tested.
  4371.            CASE (<string>!<number>)      ; Match Sx and <string>
  4372.            ...                 ; .. execute if a match
  4373.  ->           ENDCASE                 ; End of first case
  4374.  ->           CASE <string>             ; <String> = "_NULL" -> empty
  4375.            ...
  4376.  ->           ENDCASE                 ; End of second case
  4377.            ...
  4378.  ->           DEFAULT                 ; DEFAULT executed if no case
  4379.            ...                 ; .. was matched
  4380.  ->           ENDCASE                 ; End of default case
  4381.  ->           ENDSWITCH             ; End of SWITCH domain
  4382.  
  4383.          Statements between a SWITCH and an ENDSWITCH which are not
  4384.          themselves within a CASE/ENDCASE or DEFAULT/ENDCASE are ignored.
  4385.          SWITCH domains may be nested with IF domains, GOSUBs, DO, FOR
  4386.          and WHILE up to a maximum stack depth of 20.
  4387.  
  4388.          Note that either a string OR a numeric variable may be used
  4389.          with the SWITCH statement.  Strings and numerics may be
  4390.          mixed in any (useful) manner with SWITCH and CASEs.
  4391.  
  4392.          Substring bounds are not allowed on the SWITCH variable, but are
  4393.          allowed on the CASE variable.
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399. Version 2.7: 901015
  4400.  
  4401. COM-AND: IBM PC Communication Script Language                 Page  76
  4402.  
  4403.  
  4404. V.    Script Language Commands (continued)
  4405.  
  4406.  
  4407.     Sx = <expression>
  4408.  
  4409.          String expressions may be computed and assigned directly with
  4410.          the syntax "Sx = <expression>".  <Expression> is any legitimate
  4411.          combination of values and operators.  For example:
  4412.  
  4413.          S0 = S1 & S2 * S3(4:5)
  4414.          S0(70:79) = S1
  4415.  
  4416.          Values may be literal or string/numeric variables.  Operators
  4417.          allowed are "*" (concatenate at end), and "&" (trim trailing
  4418.          blanks and then concatenate).  Substrings may be specified using
  4419.          (from:to) notation:  from column # to column #.
  4420.  
  4421.          Numeric variables may also be included.  An implicit ITOA will
  4422.          be performed (leading zeroes suppressed and left justified).
  4423.          The width of the value is exactly the width of the value so
  4424.          formatted.
  4425.  
  4426.          This usage, string expression, is the only statement in the
  4427.          COM-AND script language that supports 'string deposit'...  i.e.
  4428.          specification of a substring for assignment.  I hope that a
  4429.          future extension of this script language will allow string
  4430.          deposit as freely as string extraction.
  4431.  
  4432.          String variables may also be 'indexed'.  For example, S0[1] is
  4433.          S1, S1[1] is S2, and so on.  Arithmetic expressions are allowed
  4434.          as indices.  Indices may be used on either side of a store (e.g.
  4435.          "N0[N1] = N2[N3]").  An index does not 'wrap' (i.e.  N0[-1] is
  4436.          N0, not N99).  For example:
  4437.  
  4438.          S0 = S0[2](2:3) ; Extract cols 2-3 from S2 and place in S0
  4439.  
  4440.  ->    TERMINAL
  4441.  
  4442.          The TERMINAL statement terminates a COM-AND script, returning to
  4443.          CRT mode.    It may be coded at any level (for example within a
  4444.          subroutine reached through a call from a subroutine).  Example:
  4445.  
  4446.  ->         TERMINAL             ; End of script
  4447.          ; Nothing past this point in the script is executed
  4448.  
  4449.          Note also the EXIT and CONNECT command.
  4450.  
  4451.  
  4452.  
  4453.  
  4454. Version 2.7: 901015
  4455.  
  4456. COM-AND: IBM PC Communication Script Language                 Page  77
  4457.  
  4458.  
  4459. V.    Script Language Commands (continued)
  4460.  
  4461.  
  4462.  ->    TIME Sx [0!1]
  4463.  
  4464.          The TIME statement store the current system time into the target
  4465.          variable.    The TIME is formatted according to the optional
  4466.          format argument (if provided and nonzero, the time is formatted
  4467.          hh:mm:ss where hh is 0-23; otherwise it is formatted hh:mm:ss
  4468.          with a final AM or PM).  Example:
  4469.  
  4470.  ->         TIME S1 1             ; Get the time of day military fmt
  4471.  
  4472.  ->    TRACE (ON!OFF)
  4473.  
  4474.          The TRACE statement turns on and off script file tracing.    When
  4475.          tracing is enabled, each line of the script file is displayed on
  4476.          the CRT before the statement is executed.    If logging is
  4477.          enabled, the trace display is also copied to the log.  Example:
  4478.  
  4479.  ->         TRACE ON             ; Turn on tracing
  4480.  
  4481.  ->    TRANSMIT <string>
  4482.  
  4483.          The TRANSMIT statement writes the given string to the commun-
  4484.          ications line.  TRANSMIT does not add a carriage return to the
  4485.          string;  if a carriage return is required, it should be
  4486.          contained in the string (^M is a carriage return).  TRANSMIT
  4487.          backscans the text to be transmitted and does not send trailing
  4488.          blanks.  Examples:
  4489.  
  4490.  ->         TRANSMIT S0         ; Send what's in S0
  4491.  ->         TRANSMIT "text"         ; Send text without a c/r
  4492.  ->         TRANSMIT "text^M"       ; Send text with a c/r
  4493.  
  4494.          Note: To be compatible with PCPlus, a tilde (~) represents
  4495.          a 1/2 second pause in the TRANSMIT string.
  4496.  
  4497.     TSINCE [(#)] Nx Ny Nz
  4498.  
  4499.          The TSINCE statement reads the time since a given timer was set
  4500.          (all timers are initialized to the time the script is loaded but
  4501.          may be changed with "SET TIMER"), in hours, minutes and seconds.
  4502.          10 timers are supported.  Example:
  4503.  
  4504.          TSINCE N0,N1,N2         ; Read time since timer 0 was set
  4505.          TSINCE (9) N0,N1,N2     ; Read time since timer 9 was set
  4506.  
  4507.  
  4508.  
  4509. Version 2.7: 901015
  4510.  
  4511. COM-AND: IBM PC Communication Script Language                 Page  78
  4512.  
  4513.  
  4514. V.    Script Language Commands (continued)
  4515.  
  4516.  
  4517.  ->    TYPE <string>
  4518.  
  4519.          The TYPE statement opens the file specified by <string> and
  4520.          displays it to the local console.    This is equivalent to the
  4521.          interactive Alt-W command of COM-AND.  Example:
  4522.  
  4523.  ->         TYPE "COM-AND.DOC"      ; Don't do this:  too big!
  4524.  
  4525.     UNTIL <condition>
  4526.  
  4527.          The UNTIL statement terminates the clause of a DO loop.  The
  4528.          specified condition is evaluated, and looping occurs if the
  4529.          evaluation is false.  Refer to DO above for an example.
  4530.  
  4531.          The <condition> executed by UNTIL has the same form as the
  4532.          condition of the 'IF' statement.
  4533.  
  4534.     UPDATE
  4535.  
  4536.          The UPDATE statement updates the .DFT file.  This is equivalent
  4537.          to the STORE DEFAULT instruction.    Example:
  4538.  
  4539.          UPDATE             ; Store new settings
  4540.  
  4541.     UPPER Sx
  4542.  
  4543.          The UPPER statement upper cases all alphabetic characters in Sx.
  4544.          Example:
  4545.  
  4546.          UPPER S5             ; Force all upper case
  4547.  
  4548.     VERSION Nx
  4549.  
  4550.          The VERSION statement reads the current version of COM-AND
  4551.          (major*10+minor) and places it into a numeric variable.
  4552.          Example:
  4553.  
  4554.          VERSION N0          ; N0 = 23 if version 2.3
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564. Version 2.7: 901015
  4565.  
  4566. COM-AND: IBM PC Communication Script Language                 Page  79
  4567.  
  4568.  
  4569. V.    Script Language Commands (continued)
  4570.  
  4571.  
  4572.  ->    WAITFOR <string> [<number>]
  4573.  
  4574.          The WAITFOR instruction waits up to given (explicit in <number>,
  4575.          or default) number of seconds for a the target string to be
  4576.          received.    The WAITFOR instruction sets the WAITFOR condition
  4577.          (tested by IF) according to whether or not the target <string>
  4578.          was received.  The WAITFOR function is not case sensitive.
  4579.          Example:
  4580.  
  4581.  ->         WAITFOR "U#="           ; Waitfor GEnie user # prompt
  4582.  
  4583.          Note:  As with WHEN strings, carriage returns, line feeds, and
  4584.          backspaces should not be encoded in the WAITFOR target.  A
  4585.          special provision has been made for the construct:
  4586.  
  4587.  ->         WAITFOR "^M"            ; Waitfor the next carriage return
  4588.  
  4589.          This was required because of the frequency with which scripts
  4590.          that have been published use the construct.  However, in the
  4591.          general case, avoid carriage returns, line feeds and back-
  4592.          spaces in the WAITFOR string.
  4593.  
  4594.     WCLOSE
  4595.  
  4596.          The WCLOSE instruction closes a window opened with the WOPEN
  4597.          instruction.  If no windows are open FAILURE is set.  Otherwise,
  4598.          (1) The saved area (if one was saved) is restored and (2) The ON
  4599.          ESCAPE condition at the time of the WOPEN is restored.  Example:
  4600.  
  4601.          WCLOSE             ; Must match a WOPEN above
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619. Version 2.7: 901015
  4620.  
  4621. COM-AND: IBM PC Communication Script Language                 Page  80
  4622.  
  4623.  
  4624. V.    Script Language Commands (continued)
  4625.  
  4626.  
  4627.  ->    WHEN [(#)] <string> <string>
  4628.  
  4629.          The WHEN instruction establishes a 'trigger' condition which
  4630.          will be recognized and responded to automatically.  WHEN has two
  4631.          arguments:  the first argument is a <string> which, when
  4632.          received will result in the transmission of the second string.
  4633.          Example:
  4634.  
  4635.  ->         WHEN "Press return for more" "^M" ; Respond w/c/r
  4636.  
  4637.          The WHEN statement has been extended to allow up to 10 WHEN
  4638.          settings (WHEN (0), WHEN (1) ...  WHEN (9), with an unqual-
  4639.          ified WHEN equivalent to WHEN (0)).  Each must be set and
  4640.          cleared individually.  Examples:
  4641.  
  4642.          WHEN (0) "more?" "^M"   ; Same as WHEN
  4643.          WHEN (9) "Agree?" "Y^M" ; Set last WHEN
  4644.  
  4645.          WHEN trigger strings are not case sensitive;  you needn't
  4646.          represent the trigger exactly.  The WHEN matching begins after
  4647.          receipt of a carriage return, and continues until the length
  4648.          buffered exceeds that of the WHEN string.
  4649.  
  4650.          Note:  The SET ANYWHEN statement affects the type of match
  4651.          performed by the WHEN statement.  When ANYWHEN is off (the
  4652.          default), a match must be made from the start a received line
  4653.          (i.e.  immediately after the return).  When ANYWHEN is on, the
  4654.          match is a substring test against the entire received buffer.
  4655.  
  4656.          If WHEN triggers are to be used during an RGET, the length of
  4657.          the RGET target must be larger than the largest WHEN trigger
  4658.          string.
  4659.  
  4660.          Carriage returns and line feeds cannot be included in a WHEN
  4661.          trigger string.
  4662.  
  4663.          WHEN settings are cleared with the CWHEN statement.
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674. Version 2.7: 901015
  4675.  
  4676. COM-AND: IBM PC Communication Script Language                 Page  81
  4677.  
  4678.  
  4679. V.    Script Language Commands (continued)
  4680.  
  4681.  
  4682.     WHILE <condition>
  4683.  
  4684.          The WHILE statement asserts the beginning of a loop, if the
  4685.          condition specified evaluates true.  The clause after the WHILE
  4686.          statement is executed through an ENDWHILE statement and looping
  4687.          occurs (back to evaluate the condition again).
  4688.  
  4689.          The WHILE statement evaluates the given condition (see the 'IF'
  4690.          statement for a list of conditions).  If the evaluation is
  4691.          false, statements following are skipped until the corresponding
  4692.          ENDWHILE is encountered.  Example:
  4693.  
  4694.          N0 = 0             ; Initialize index
  4695.          WHILE LT N0 10         ; Loop for 10 times
  4696.          N0 = N0+1         ; Increment index
  4697.          ...
  4698.          ENDWHILE         ; Loop back to WHILE
  4699.  
  4700.  
  4701.          Note: (1) GOTO statements may never enter a WHILE loop;  even
  4702.                to leave an inner loop to return to an outer loop.
  4703.  
  4704.          Note: (2) WHILE statements may be nested (along with IF, FOR,
  4705.                WHILE, SWITCH and DO loops) up to 20 levels.  How-
  4706.                ever, they may not overlap other WHILE loops, or
  4707.                other flow-of-control statements.
  4708.  
  4709.          Note: (3) The clause of the WHILE statement (statements after
  4710.                'WHILE' down to the ENDWHILE statement) is not
  4711.                necessarily executed, even once.  The conditional
  4712.                evaluation is performed before each iteration.
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729. Version 2.7: 901015
  4730.  
  4731. COM-AND: IBM PC Communication Script Language                 Page  82
  4732.  
  4733.  
  4734. V.    Script Language Commands (continued)
  4735.  
  4736.  
  4737.     WOPEN row col row col attr [label]
  4738.  
  4739.          The WOPEN command opens a window on the screen, saving the
  4740.          current ON ESCAPE setting, and optionally, setting a new ON
  4741.          ESCAPE condition.    Up to 10 windows may be opened at one time
  4742.          (if 10 is exceeded, FAILURE is set).
  4743.  
  4744.          The WOPEN instruction combines a number of other instructions
  4745.          into a one function.  WOPEN is equivalent to:
  4746.  
  4747.              Sx = "_ONESCAPE"                ; Read current
  4748.              ON ESCAPE GOSUB label         ; Set new
  4749.              CURSOR Nx Ny             ; Read current & save
  4750.              SAVE row col row col         ; Save screen area
  4751.  ->             BOX  row col row col attr         ; Clear scr, draw box
  4752.  
  4753.          The corresponding WCLOSE is equivalent to:
  4754.  
  4755.              ON ESCAPE GOSUB Sx          ; Reset condition
  4756.              RESTORE                 ; Restore screen
  4757.  ->             LOCATE Nx Ny             ; Restore cursor
  4758.  
  4759.          The ON ESCAPE condition is reset upon WCLOSE to the setting at
  4760.          the time of the WOPEN.  Intervening "ON ESCAPE" statements are
  4761.          therefore cancelled.  Intervening SAVEs and RESTOREs are not
  4762.          cancelled, however.  Have care!
  4763.  
  4764.          Example:
  4765.  
  4766.          WOPEN 10,10 20,70 (default) ESCAPE_Label ; Open a window
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784. Version 2.7: 901015
  4785.  
  4786. COM-AND: IBM PC Communication Script Language                 Page  83
  4787.  
  4788.  
  4789. V.    Script Language Commands (continued)
  4790.  
  4791.  
  4792.     WRITE Sx [Nx]
  4793.  
  4794.          The WRITE command writes a string from a string variable to the
  4795.          output file.  The length of the string variable is specified by
  4796.          Nx.  The output file must be opened by a previous FOPENO.
  4797.  
  4798.          In TEXT mode the WRITE command translates CRs in the string
  4799.          buffer to CR/LF pairs.  No tab compression is performed.
  4800.  
  4801.          WRITE writes up to 80 characters from Sx, according to the value
  4802.          in Nx.  Example:
  4803.  
  4804.          WRITE S0 75         ; Write 75 bytes
  4805.  
  4806.          Note that the length given applies to the string as given.  The
  4807.          string "^M" is 2 characters long and should be specified as a
  4808.          length of 2, although only 1 character (control-M) will be
  4809.          written.  The string "`"", interestingly enough, is 1 character
  4810.          long!
  4811.  
  4812.          Note that the length parameter is optional.  If not specified,
  4813.          the current length of the variable will be computed.
  4814.  
  4815.          Note that COM-AND does not write a ^Z (decimal 26) to the output
  4816.          file when it is closed, having been opened in TEXT mode.  The
  4817.          script author may add the ASCII EOF convention by preceding the
  4818.          FCLOSEO with the statement:
  4819.  
  4820.          WRITE "^Z"              ; ASCII EOF convention
  4821.  
  4822.          Note also: FPUTC/FPUTS/FWRITE commands.
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839. Version 2.7: 901015
  4840.  
  4841. COM-AND: IBM PC Communication Script Language                 Page  84
  4842.  
  4843.  
  4844. VI.    SET commands
  4845.  
  4846.  
  4847.     SET subcommands allow string variables for their operands.  For
  4848.     example, ON or OFF may be contained in a string, and the string
  4849.     used as the final operand of the statement.
  4850.  
  4851.  
  4852.     A. Basic set
  4853.  
  4854.        SET 25
  4855.  
  4856.         SET 25 turns on CGA mode (25 lines), for CGA/Monochrome.
  4857.         NOTE: SET 25 clears any DWINDOW in effect.
  4858.  
  4859.        SET 43
  4860.  
  4861.         SET 43 turns on EGA mode (43 lines), if an EGA is available.
  4862.         [SET 43 sets VGA (50 lines), if VGA is available.]
  4863.         NOTE: SET 43 clears any DWINDOW in effect.
  4864.  
  4865.        SET ACCESSORY NAME # <string>
  4866.        SET ACCESSORY SUBD # <string>
  4867.        SET ACCESSORY PGM  # <string>
  4868.        SET ACCESSORY SCRI # <string>
  4869.  
  4870.            SET ACCE <field> stores the given string into the stated
  4871.            field (name, subdir, ...).  Each field is differently sized.
  4872.            Accessory directory entry numbers range from 1-50.
  4873.  
  4874.        SET ADVERT (ON!OFF)
  4875.  
  4876.         SET ADVERT sets and resets the initial advertisement display.
  4877.  
  4878.  ->       SET ALARM (ON!OFF)
  4879.  
  4880.         SET ALARM sets and resets the alarm function.  When OFF,
  4881.         the alarm does not sound (e.g. after download),but a delay,
  4882.         for a period set through Alt-S or SET ATIME, is performed.
  4883.  
  4884.        SET ANYWHEN (ON!OFF)
  4885.  
  4886.         SET ANYWHEN controls the execution of any current WHEN condi-
  4887.         tions.    When ANYWHEN is off (the default), matching occurs
  4888.         from the beginning of the buffer.  When ANYWHEN is on, the
  4889.         match is actually a substring match to the received buffer.
  4890.  
  4891.  
  4892.  
  4893.  
  4894. Version 2.7: 901015
  4895.  
  4896. COM-AND: IBM PC Communication Script Language                 Page  85
  4897.  
  4898.  
  4899. VI.    SET Commands (continued)
  4900.  
  4901.  
  4902.     A. Basic set (continued)
  4903.  
  4904.  ->       SET ASCII <subcommand>
  4905.  
  4906.         The SET ASCII subcommands are discussed below (section "VI").
  4907.  
  4908.  ->       SET ATIME <number>         Alarm time
  4909.  
  4910.         SET ATIME sets the duration (in seconds) of the alarm.
  4911.  
  4912.  ->       SET BACKSPACE IN (NONDESTRUC!DESTRUC)
  4913.  
  4914.         SET BACKSPACE IN controls the function performed when a
  4915.         backspace is received.    Nondestructive backspaces are not
  4916.         common, but may be needed occasionally.
  4917.  
  4918.  ->       SET BACKSPACE OUT (BACKSPACE!DELETE)
  4919.  
  4920.         SET BACKSPACE OUT controls the function performed when a
  4921.         backspace is typed.  Either a 'backspace' character (0x8)
  4922.         or a delete character (0x7f) may be transmitted.
  4923.  
  4924.        SET BAR <attr>
  4925.  
  4926.         SET BAR sets the status line bar color.  The change takes
  4927.         effect the next time the status line is updated (e.g. with
  4928.         the LEGEND command).  The new color holds after the script.
  4929.  
  4930.  ->       SET BAUDRATE (300!1200!2400!4800!9600!19K!38K!56K!115K)
  4931.  
  4932.         SET BAUD sets the communications port linespeed.  This
  4933.         command results in a reset of the line.
  4934.  
  4935.        SET BELL <number>
  4936.  
  4937.         SET BELL sets the bell tone in hertz.
  4938.  
  4939.        SET BKSCREEN <number>
  4940.  
  4941.         SET BELL sets backscreen size in pages (0-64).    Note that
  4942.         this function clears the current backscreen in the process.
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949. Version 2.7: 901015
  4950.  
  4951. COM-AND: IBM PC Communication Script Language                 Page  86
  4952.  
  4953.  
  4954. VI.    SET Commands (continued)
  4955.  
  4956.  
  4957.     A. Basic set (continued)
  4958.  
  4959.  ->       SET BREAK <number>
  4960.  
  4961.         SET BREAK sets the duration (in milliseconds) of the break
  4962.         signal (BREAK statement or Ctrl-end).
  4963.  
  4964.        SET BSUPPRESS (ON!OFF)
  4965.  
  4966.         SET BSUPPRESS sets and resets blank line suppression as
  4967.         implemented in COM-AND.
  4968.  
  4969.        SET CALLLOG (ON!OFF)
  4970.  
  4971.         SET CALLLOG sets and resets COM-AND's call logging.  The
  4972.         calllog records DIAL (Alt-D), REDIAL (Alt-R), HANGUP
  4973.         (Alt-H), and file transfers (PgUp and PgDn).
  4974.  
  4975.        SET CDISPLAY (ON!OFF)
  4976.  
  4977.         SET CDISPLAY turns on and off control character display.
  4978.         BBS's often use control characters as graphics, and network
  4979.         host systems only generate them inadvertantly.
  4980.  
  4981.        SET CDRESPECT (ON!OFF)
  4982.  
  4983.         SET CDRESPECT sets and resets COM-AND's treatment of the
  4984.         modem carrier detect.  When CD respect is 'off', COM-AND
  4985.         treats modem carrier as always 'true'.
  4986.  
  4987.        SET CHAT (ON!OFF)
  4988.  
  4989.         SET CHAT turns on and off chat mode.
  4990.  
  4991.        SET CHLINES <number>
  4992.  
  4993.         SET CHLINES specifies the size of the CHAT window.
  4994.  
  4995.        SET CLOCK (ON!OFF!NEW)
  4996.  
  4997.         SET CLOCK turns on and off the on-screen clock.  The "NEW"
  4998.         subcommands resets the "call time" and makes an entry in
  4999.         the calllog (if calllogging).
  5000.  
  5001.  
  5002.  
  5003.  
  5004. Version 2.7: 901015
  5005.  
  5006. COM-AND: IBM PC Communication Script Language                 Page  87
  5007.  
  5008.  
  5009. VI.    SET Commands (continued)
  5010.  
  5011.  
  5012.     A. Basic set (continued)
  5013.  
  5014.        SET COLOR (ON!OFF)
  5015.  
  5016.         SET COLOR sets/reset COM-AND's use of a color monitor, if
  5017.         available.  Note the screen is repainted accordingly.
  5018.  
  5019.        SET COMBASE <port> Nx
  5020.  
  5021.         SET COMBASE specifies the base address to be used for the
  5022.         given port (COM1, COM2, etc).
  5023.  
  5024.        SET COMVECTOR <port> Nx
  5025.  
  5026.         SET COMVECTOR specifies the vector number to be used for the
  5027.         given port (COM1, COM2, etc).
  5028.  
  5029.  ->       SET CR (CR!CR_LF)
  5030.  
  5031.         SET CR controls the display of received carriage returns.
  5032.         When set to CR_LF, received carriage returns are displayed
  5033.         as carriage return/line feeds.
  5034.  
  5035.  ->       SET CR_IN (CR!CR_LF)
  5036.  
  5037.         SET CR_IN is equivalent to SET CR above.
  5038.  
  5039.  ->       SET DATABITS (7!8)
  5040.  
  5041.         SET DATA sets the communications port to 7 or 8 data bits
  5042.         (this does not affect XMODEM, WXMODEM, or YMODEM transfers).
  5043.  
  5044.        SET DBLCLICK #
  5045.  
  5046.         SET DBLCLICK specifies the interval (in MS) during which a
  5047.         double click of the mouse button may occur.
  5048.  
  5049.        SET DEFAULT <attr>
  5050.  
  5051.         SET DEFA sets the color for menu windows.  The change takes
  5052.         effect the next time a window is invoked (e.g. with an alt'd
  5053.         key).  The new color holds after the script terminates.
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059. Version 2.7: 901015
  5060.  
  5061. COM-AND: IBM PC Communication Script Language                 Page  88
  5062.  
  5063.  
  5064. VI.    SET Commands (continued)
  5065.  
  5066.  
  5067.     A. Basic set (continued)
  5068.  
  5069.        SET DIAL NAME # <string>
  5070.        SET DIAL NUMB # <string>
  5071.        SET DIAL RATE # <string>
  5072.        SET DIAL PARI # <string>
  5073.        SET DIAL DATA # <string>
  5074.        SET DIAL STOP # <string>
  5075.        SET DIAL SCRI # <string>
  5076.  
  5077.            SET DIAL <field> stores the given string into the stated
  5078.            field (name, number, ...).  Each field is differently sized.
  5079.            Dialing directory entry numbers range from 1-100.
  5080.  
  5081.  ->       SET DISPLAY (ON!OFF)
  5082.  
  5083.         SET DISPLAY sets and resets the display of received char-
  5084.         acters.  You may use this to suppress (OFF) received text
  5085.         while you wait for an appropriate response.
  5086.  
  5087.  ->       SET DLDIR <string>
  5088.  
  5089.         SET DLDIR establishes a default path for downloaded files
  5090.         when the file name given is not pathed.
  5091.  
  5092.         The <string> provided may be of the form: d:\path...\path
  5093.  
  5094.        SET DOSLEVEL <number>
  5095.  
  5096.         SET DOSLEVEL establishes an error level (default 0) to be
  5097.         returned to the invoking program when COM-AND terminates.
  5098.         Among other things, this provides a means to exit COM-AND
  5099.         but retain control of processing (via a batch file).
  5100.  
  5101.        SET DPREFIX <string>
  5102.  
  5103.         SET DPREFIX specifies the prefix used to build a dialing
  5104.         command.
  5105.  
  5106.        SET DROPDTR (ON!OFF)
  5107.  
  5108.         SET DROPDTR specifies method used (issue modem escape+hangup
  5109.         string, or drop DTR) to hangup.
  5110.  
  5111.  
  5112.  
  5113.  
  5114. Version 2.7: 901015
  5115.  
  5116. COM-AND: IBM PC Communication Script Language                 Page  89
  5117.  
  5118.  
  5119. VI.    SET Commands (continued)
  5120.  
  5121.  
  5122.     A. Basic set (continued)
  5123.  
  5124.        SET DSUFFIX <string>
  5125.  
  5126.         SET DSUFFIX specifies the suffix used to build a dialing
  5127.         command.
  5128.  
  5129.        SET DTR (ON!OFF)
  5130.  
  5131.         SET DTR raises and lowers the DTR signal to the modem.
  5132.  
  5133.  ->       SET DUPLEX (HALF!FULL)
  5134.  
  5135.         SET DUPLEX turns on (HALF) and off (FULL) local echo.
  5136.  
  5137.  ->       SET ENQ (OFF!CISB)
  5138.  
  5139.         SET ENQ CISB allows automatic file transfers initiated by
  5140.         CIS.  SET ENQ OFF ignores ENQ characters.
  5141.  
  5142.        SET EXIT <script name>
  5143.  
  5144.         SET EXIT specifies a script file name to be invoked upon
  5145.         termination of COM-AND.  Termination occurs manually with
  5146.         Alt-X, or through the script command BYE.  When terminated
  5147.         and an EXIT script has been set, COM-AND invokes the script,
  5148.         after testing for carrier.  When an EXIT script is set, the
  5149.         only way to terminate COM-AND is through the script itself.
  5150.         i.e.  no EXIT script is specified in the EXIT script, and
  5151.         the EXIT script performs a BYE command.
  5152.  
  5153.         Note that the EXIT script function is cleared when it is
  5154.         invoked...  i.e.  an EXIT script must re-specify an EXIT
  5155.         script name if the function is to be preserved (and COM-AND
  5156.         not to terminate).
  5157.  
  5158.         Note that COM-AND must be ABLE to find the EXIT script on
  5159.         termination.  It is best if all EXIT scripts reside in the
  5160.         COM-AND= environment variable pointed subdirectory.
  5161.  
  5162.        SET EXQUERY (ON!OFF)
  5163.  
  5164.         SET EXQUERY sets/resets the query-on-exit function.
  5165.  
  5166.  
  5167.  
  5168.  
  5169. Version 2.7: 901015
  5170.  
  5171. COM-AND: IBM PC Communication Script Language                 Page  90
  5172.  
  5173.  
  5174. VI.    SET Commands (continued)
  5175.  
  5176.  
  5177.     A. Basic set (continued)
  5178.  
  5179.        SET FAILURE (ON!OFF)
  5180.  
  5181.         SET FAILURE sets and resets the FAILURE condition tested by
  5182.         the IF statement.  SET FAILURE may be used to modify various
  5183.         conditions setting and resetting SUCCESS/FAILURE.
  5184.  
  5185.        SET FLAG [(#)] (ON!OFF)
  5186.  
  5187.         The SET FLAG instruction sets and resets one of 10 flags.
  5188.         Flags may be tested with the IF statement.
  5189.  
  5190.  ->       SET FLOWCTRL (ON!OFF)
  5191.  
  5192.         SET FLOWCTRL turns on and off software flow control used
  5193.         during receipt of text from the host.  This command is global
  5194.         (SET ASCII FLOW is local to ASCII SENDs), affecting both
  5195.         display receipt and ASCII sends.
  5196.  
  5197.        SET FOUND (ON!OFF)
  5198.  
  5199.         SET FOUND sets and resets the FOUND condition tested by
  5200.         the IF statement.  SET FOUND may be used to imitate FIND
  5201.         statement returns.
  5202.  
  5203.  ->       SET HARDFLOW (ON!OFF)
  5204.  
  5205.         SET HARD enables and disables hardware flow control.  Flow
  5206.         control is performed at the hardware level by raising RTS
  5207.         and waiting (for up to 20 seconds) for CTS.  Note that HARD-
  5208.         FLOW is overridden by RTSFLOW (below).
  5209.  
  5210.        SET HMOUSE #
  5211.  
  5212.         SET HMOUSE specifies the mouse horizontal sensitivity.
  5213.  
  5214.        SET INAFTER (ON!OFF)
  5215.  
  5216.         SET INAFTER turns on and off modem initialization after
  5217.         hangup.
  5218.  
  5219.        SET KBDBUFFER (ON!OFF)
  5220.  
  5221.         SET KBDBUF turns on and off the keyboard display buffer.
  5222.  
  5223.  
  5224. Version 2.7: 901015
  5225.  
  5226. COM-AND: IBM PC Communication Script Language                 Page  91
  5227.  
  5228.  
  5229. VI.    SET Commands (continued)
  5230.  
  5231.  
  5232.     A. Basic set (continued)
  5233.  
  5234.  ->       SET KERMIT <subcommand>
  5235.  
  5236.         The SET KERMIT subcommands are discussed below ("VI").
  5237.  
  5238.        SET LD # <string>
  5239.  
  5240.            SET LD stores the given string into the given LD directory
  5241.            entry:  1,2,3, or 4 is required, 1="+",2="-",3="#",4="@" in
  5242.            the Alt-D LD directory.
  5243.  
  5244.        SET LINKED (ON!OFF)
  5245.  
  5246.         SET LINKED sets and resets the LINKED condition tested by
  5247.         the IF statement.  SET LINKED may be used to imitate script
  5248.         execution through Alt-D.
  5249.  
  5250.        SET MACRO # <string>
  5251.  
  5252.            SET MACRO stores the given string into the given MACRO dir-
  5253.            ectory entry:  0-9.
  5254.  
  5255.        SET MASK (ON!OFF)
  5256.  
  5257.         SET MASK sets and resets the 7 bit mask of COM-AND.
  5258.  
  5259.        SET MCONNECT <string>
  5260.  
  5261.         SET MCONNECT specifies the modem connect string used to
  5262.         recognize a successful dialing function.
  5263.  
  5264.        SET MDCHAR <value>
  5265.  
  5266.         SET MDCHAR sets an alternate modem delay character used
  5267.         as 1/2 second delays in TRANSMIT and in modem strings. Note
  5268.         that this value is retained after the script terminates.
  5269.  
  5270.        SET MDELAY #
  5271.  
  5272.         SET MDELAY specifies the intercharacter time (in MS) for
  5273.         strings issued to the modem (e.g. dialing strings).
  5274.  
  5275.  
  5276.  
  5277.  
  5278.  
  5279. Version 2.7: 901015
  5280.  
  5281. COM-AND: IBM PC Communication Script Language                 Page  92
  5282.  
  5283.  
  5284. VI.    SET Commands (continued)
  5285.  
  5286.  
  5287.     A. Basic set (continued)
  5288.  
  5289.  ->       SET MENUMODE (ON!OFF)
  5290.  
  5291.         SET MENUMODE specifies the new MENUMODE value.    It takes
  5292.         effect only upon completion of the script.
  5293.  
  5294.        SET MESCAPE <string>
  5295.  
  5296.         SET MESCAPE specifies the string to be used to get the
  5297.         attention of the modem (e.g. before hangup).
  5298.  
  5299.        SET MHANGUP <string>
  5300.  
  5301.         SET MHANGUP specifies the string used (if DROPDTR is OFF)
  5302.         to hangup the phone.
  5303.  
  5304.        SET MINIT <string>
  5305.  
  5306.         SET MINIT specifies the string transmitted to the modem
  5307.         when COM-AND is loaded.
  5308.  
  5309.        SET MUSIC (ON!OFF)
  5310.  
  5311.         SET MUSIC sets and resets COM-AND's processing of music
  5312.         escape sequences.  Music escape sequences are received:
  5313.         "ESC [ M <string> <control-N>'.
  5314.  
  5315.  ->       SET PARITY (EVEN!ODD!NONE)
  5316.  
  5317.         SET PARITY sets the communications line parity.
  5318.  
  5319.        SET PCJR (ON!OFF)
  5320.  
  5321.         SET PCJr sets and resets a PCJr mode, which suspends the
  5322.         comm line during disk I/O.  This only effects transcripts,
  5323.         Windowed XMODEM and Windowed Kermit.
  5324.  
  5325.  ->       SET PORT (COM1!COM2!COM3!COM4)
  5326.  
  5327.         SET PORT declares the communications port to be used.
  5328.         This command resets the communications line.
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334. Version 2.7: 901015
  5335.  
  5336. COM-AND: IBM PC Communication Script Language                 Page  93
  5337.  
  5338.  
  5339. VI.    SET Commands (continued)
  5340.  
  5341.  
  5342.     A. Basic set (continued)
  5343.  
  5344.        SET QUIET (ON!OFF)
  5345.  
  5346.         SET QUIET turns on and off bell character suppression.
  5347.  
  5348.  ->       SET RDELAY <number>
  5349.  
  5350.         SET RDELAY sets the duration (in seconds) of the delay
  5351.         between Alt-R and script DIAL statement redial attempts.
  5352.  
  5353.        SET RDISPLAY (ON!OFF)
  5354.  
  5355.         SET RDISPLAY sets and resets the display of received char-
  5356.         acters.  You may use this to suppress (OFF) received text
  5357.         while you wait for an appropriate response.
  5358.  
  5359.        SET RDMAX <number>
  5360.  
  5361.         A script author may set a limit to the number of redials per-
  5362.         formed through a DIAL statement.  This feature is available
  5363.         only in the script that sets it (at this time).
  5364.  
  5365.        SET RECHO (ON!OFF)
  5366.  
  5367.         SET RECHO sets and resets the echo of received characters.
  5368.         This might be enabled (ON), for example, in a script that
  5369.         performed a 'HOST' mode for outside callers.
  5370.  
  5371.        SET REMAP (ON!OFF)
  5372.  
  5373.         SET REMAP enables (on) and disables (off) keyboard remapping.
  5374.         A remap must first be created and placed into a file COM-AND
  5375.         .RMP (for example using the supplied REMAP.CMD script).
  5376.  
  5377.  ->       SET REMOTE (ON!OFF)
  5378.  
  5379.         SET REMOTE enables (on) and disables (off) the ability to
  5380.         execute script functions through received commands.  REMOTE
  5381.         commands are received: "ESC,^,<script command> <cr>".
  5382.  
  5383.        SET RLEOK (ON!OFF)
  5384.  
  5385.         SET RLEOK sets and resets the possibility of RLE display
  5386.         during normal receive functions.
  5387.  
  5388.  
  5389. Version 2.7: 901015
  5390.  
  5391. COM-AND: IBM PC Communication Script Language                 Page  94
  5392.  
  5393.  
  5394. VI.    SET Commands (continued)
  5395.  
  5396.  
  5397.     A. Basic set (continued)
  5398.  
  5399.        SET RMODE (ASCII!BINARY)
  5400.  
  5401.         SET RMODE affects the RGET command subsequent.    By default,
  5402.         the RMODE setting is ASCII.  When set to ASCII, RGETs ignore
  5403.         nulls and line feeds, end on a carriage return (or length),
  5404.         and backspace/rubouts are implemented (and not buffered).
  5405.         When the mode is binary, nulls, carriage returns, line feeds,
  5406.         backspaces and rubouts are buffered.
  5407.  
  5408.        SET RTS (ON!OFF)
  5409.  
  5410.         SET RTS sets and resets request-to-send bit of the modem.
  5411.         Generally, this capability should be avoided.
  5412.  
  5413.        SET RTSD (ON!OFF)
  5414.  
  5415.         SET RTSD enables (on) and disables (off) RTS Discipline
  5416.         in COM-AND.  When enabled, RTS is raised before every write
  5417.         and lowered after.  When disabled, RTS is not lowered, and
  5418.         the script controls RTS (via SET RTS above).
  5419.  
  5420.        SET RTSF (ON!OFF)
  5421.  
  5422.         SET RTSF enables (on) and disables (off) RTS flow control.
  5423.         When RTS flow control is enabled the RTS line is used to
  5424.         signal the modem that COM-AND is able (or not able) to re-
  5425.         ceive characters.  This method of flow control is required by
  5426.         some (very new) modems.  Refer to Appendix J for discussion.
  5427.  
  5428.        SET SILENCE <seconds>
  5429.  
  5430.         SET SILENCE sets and resets the timeout used by ON SILENCE
  5431.         GOSUB.    The trap defaults to 300 seconds.  Note that SET
  5432.         SILENCE changes only the timeout, not the trap clock.
  5433.  
  5434.        SET SLOWOUT (ON!OFF)
  5435.  
  5436.         SET SLOWOUT sets and resets 'slow output' during file trans-
  5437.         fers.  COM-AND usually performs transfers at machine speed
  5438.         (interrupt driven writes);  Some network modems cannot take
  5439.         this speed.
  5440.  
  5441.  
  5442.  
  5443.  
  5444. Version 2.7: 901015
  5445.  
  5446. COM-AND: IBM PC Communication Script Language                 Page  95
  5447.  
  5448.  
  5449. VI.    SET Commands (continued)
  5450.  
  5451.  
  5452.     A. Basic set (continued)
  5453.  
  5454.  ->       SET SOFTFLOW (ON!OFF)
  5455.  
  5456.         SET SOFTFLOW sets and resets software flow control (XON/XOFF)
  5457.         as used in receive and ASCII SEND.
  5458.  
  5459.  ->       SET STOPBITS (1!2)
  5460.  
  5461.         SET STOP sets the communications port to 1 or 2 stop bits.
  5462.  
  5463.  ->       SET SUCCESS (ON!OFF)
  5464.  
  5465.         SET SUCCESS sets and resets the SUCCESS condition tested by
  5466.         the IF statement.  SET SUCCESS be used to modify various
  5467.         conditions that set/reset SUCCESS/FAILURE.
  5468.  
  5469.  ->       SET SWRITE (BIOS!DIRECT!DOS)
  5470.  
  5471.         SET SWRITE sets COM-AND to use either BIOS or direct screen
  5472.         buffer access for menu saves/restores.    Direct access is much
  5473.         faster (of course), however, a certain few machines are not
  5474.         compatible to the extent of screen memory address.
  5475.  
  5476.         SET SWRITE DOS only affects text written to the screen.
  5477.         When used, text received is passed to the console device.
  5478.  
  5479.         SET SWRITE BIOS affects both text written to the screen
  5480.         and the method used for screen saves.  BIOS is used in both
  5481.         cases.    If both SWRITE DOS and SWRITE BIOS are set, text goes
  5482.         through DOS, and screen save/restores go through BIOS.
  5483.  
  5484.        SET TEXT <attr>
  5485.  
  5486.         SET TEXT sets the color for text display.  The change takes
  5487.         effect the next time a character is displayed (it does not
  5488.         repaint).  The new color holds after the script terminates.
  5489.  
  5490.         NOTE: To change the color attribute for the entire screen:
  5491.  
  5492.               SET TEXT <attr>    ; Set text attr for subsequent chars
  5493.               SET COLOR "_COLOR"; Repaint screen and border
  5494.  
  5495.  
  5496.  
  5497.  
  5498.  
  5499. Version 2.7: 901015
  5500.  
  5501. COM-AND: IBM PC Communication Script Language                 Page  96
  5502.  
  5503.  
  5504. VI.    SET Commands (continued)
  5505.  
  5506.  
  5507.     A. Basic set (continued)
  5508.  
  5509.        SET TIMER [(#)]
  5510.  
  5511.         The SET TIMER instruction sets the timestamp for one of 10
  5512.         timers.  Timers are read using the TSINCE statement.
  5513.  
  5514.        SET TTHRU (ON!OFF)
  5515.  
  5516.         The SET TTHRU sets the script processor to allow (ON) or not
  5517.         allow (OFF) typethrough during the script.  When set OFF,
  5518.         keystrokes are queued and will be read by KEYGET, ATGET, MAT-
  5519.         GET, GET and MGET.
  5520.  
  5521.         Note that TYPETHRU is a 'global' condition, whereas HITKEY is
  5522.         a 'local' condition.  Typethrough is suspended after HITKEY
  5523.         is tested, until the key is read.  Once the key is read, the
  5524.         HITKEY condition is disabled and typethrough is allowed
  5525.         (unless you've SET TTHRU OFF).
  5526.  
  5527.         Note: Use of SET TTHRU may inhibit termination with ESCape!
  5528.  
  5529.        SET TUNE <string>
  5530.  
  5531.         The SET TUNE sets the alarm tune to the BASIC encoded play
  5532.         statement in <string>.    The ERROR condition is set if the
  5533.         string cannot be parsed (and the alarm is not set).  Refer
  5534.         to Appendix C for the syntax of the play statement.
  5535.  
  5536.        SET VMOUSE #
  5537.  
  5538.         SET HMOUSE specifies the mouse vertical sensitivity.
  5539.  
  5540.        SET WAITFOR (ON!OFF)
  5541.  
  5542.         SET WAITFOR sets and resets the WAITFOR condition tested by
  5543.         the IF statement.  SET LINKED may be used to modify the
  5544.         results of a WAITFOR instruction.
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.  
  5552.  
  5553.  
  5554. Version 2.7: 901015
  5555.  
  5556. COM-AND: IBM PC Communication Script Language                 Page  97
  5557.  
  5558.  
  5559. VI.    SET Commands (continued)
  5560.  
  5561.  
  5562.     A. Basic set (continued)
  5563.  
  5564.        SET WATCHDOG <seconds>
  5565.  
  5566.         SET WATCHDOG sets the XOFF watchdog timer timeout.  When an
  5567.         XOFF is received a timer begins.  If no XON is received with-
  5568.         in <timer> seconds, the XOFF condition is cancelled.
  5569.  
  5570.         WARNING:  Script authors who use this command to increase the
  5571.         default XOFF timeout run a SERIOUS risk of locking up their
  5572.         machines.  XOFF is a frequent noise character...  Without the
  5573.         watchdog timer, any noise character might stop COM-AND cold.
  5574.  
  5575.        SET XSUI <number>
  5576.  
  5577.         SET XSUI sets the frequency (as an interval of blocks) with
  5578.         which COM-AND updates its protocol status screens during a
  5579.         file transfer.    XSUI is mnemonic for 'xfer screen update
  5580.         interval'.
  5581.  
  5582.         At 9600 baud and above, the time it takes to paint the status
  5583.         screen becomes a significant percentage of the overall time
  5584.         spent.    Setting the update interval to '5' will have visible
  5585.         impact at 2400 baud.
  5586.  
  5587.        SET ZMODEM <subcommand>
  5588.  
  5589.         The SET ZMODEM subcommands are discussed below ("VI").
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  5609. Version 2.7: 901015
  5610.  
  5611. COM-AND: IBM PC Communication Script Language                 Page  98
  5612.  
  5613.  
  5614. VI.    SET Commands (continued)
  5615.  
  5616.  
  5617.     B. SET ASCII subcommands
  5618.  
  5619.  ->       SET ASCII BLANKEX (ON!OFF)
  5620.  
  5621.         SET ASCII BLAN sets and resets blank line expansion for the
  5622.         SENDFILE ASCII function (if the line is empty, one blank is
  5623.         sent if this flag is on).
  5624.  
  5625.  ->       SET ASCII CHARPACE <number>
  5626.  
  5627.         SET ASCII CHARPACE sets an intercharacter delay (in milli-
  5628.         seconds for the SENDFILE ASCII function.
  5629.  
  5630.  ->       SET ASCII ECHO (ON!OFF)
  5631.  
  5632.         SET ASCII ECHO enables (if set) the text echo during a
  5633.         SENDFILE ASCII function (only during current script).
  5634.  
  5635.        SET ASCII FLOW (ON!OFF)
  5636.  
  5637.         SET ASCII FLOW sets and resets flow control SENDFILE ASCII
  5638.         function.  When on, flow control is respected.
  5639.  
  5640.  ->       SET ASCII LINEPACE <number>
  5641.  
  5642.         SET ASCII LINE sets an delay at end-of-line (CR) in tenths
  5643.         of seconds for the SENDFILE ASCII function.
  5644.  
  5645.  ->       SET ASCII PACECHAR <number>
  5646.  
  5647.         SET ASCII PACE sets a pace character for the SENDFILE ASCII
  5648.         function.  The value provided is the decimal ascii value of
  5649.         the pace character (use 0 to turn this off).
  5650.  
  5651.        SET ASCII QUIET (ON!OFF)
  5652.  
  5653.         SET ASCII QUIET disables (if set) the alarm at the end of
  5654.         a SENDFILE ASCII function (only during current script).
  5655.  
  5656.        SET ASCII TABEX (ON!OFF)
  5657.  
  5658.         SET ASCII TABEX sets and resets tab expansion for the
  5659.         SENDFILE ASCII function.
  5660.  
  5661.  
  5662.  
  5663.  
  5664. Version 2.7: 901015
  5665.  
  5666. COM-AND: IBM PC Communication Script Language                 Page  99
  5667.  
  5668.  
  5669. VI.    SET Commands (continued)
  5670.  
  5671.  
  5672.     B. SET ASCII subcommands (continued)
  5673.  
  5674.  ->       SET ASCII UP_LF (LF!STRIP)
  5675.  
  5676.         SET ASCII UP_LF sets and resets LF stripping during a
  5677.         SENDFILE ASCII function.  Note that "UP_LF CR_LF" is
  5678.         not implemented at this time.
  5679.  
  5680.        SET ASCII UP_Z (STOP!SEND)
  5681.  
  5682.         SET ASCII UP_Z sets and resets control-z handling for the
  5683.         SENDFILE ASCII function.  When STOP, the transfer stops at
  5684.         a control-z (and the control-z is not transmitted).
  5685.  
  5686.  
  5687.  
  5688.     C. SET KERMIT subcommands
  5689.  
  5690.  ->       SET KERMIT 8QUOTE <number>
  5691.  
  5692.         SET KERMIT 8QUOTE sets the 8-bit quote character used in
  5693.         KERMIT transfers.  This value may be inspected and changed
  5694.         through Alt-K.    The <number> is the decimal ascii value of
  5695.         the 8-bit quote character to be used.
  5696.  
  5697.  ->       SET KERMIT BLOCKCHECK (1!2!3)
  5698.  
  5699.         SET KERMIT BLOCK sets the length of the blockcheck used in
  5700.         KERMIT transfers.  This value may be inspected and changed
  5701.         through Alt-K.    The blockcheck may be 1, 2 or 3 bytes long.
  5702.  
  5703.  ->       SET KERMIT CQUOTE <number>
  5704.  
  5705.         SET KERMIT CQUOTE sets the control quote character used in
  5706.         KERMIT transfers.  This value may be inspected and changed
  5707.         through Alt-K.    The <number> is the decimal ascii value of
  5708.         the control quote character to be used.
  5709.  
  5710.  ->       SET KERMIT EOLCHAR <number>
  5711.  
  5712.         SET KERMIT EOLCHAR sets the end-of-line character used in
  5713.         KERMIT transfers.  This value may be inspected and changed
  5714.         through Alt-K.    The <number> is the decimal ascii value of
  5715.         the end-of-line character to be used.
  5716.  
  5717.  
  5718.  
  5719. Version 2.7: 901015
  5720.  
  5721. COM-AND: IBM PC Communication Script Language                 Page 100
  5722.  
  5723.  
  5724. VI.    SET Commands (continued)
  5725.  
  5726.  
  5727.     C. SET KERMIT subcommands (continued)
  5728.  
  5729.        SET KERMIT MARK <number>
  5730.  
  5731.         SET KERMIT MARK sets the packet mark character used in
  5732.         KERMIT transfers.  This value may be inspected and changed
  5733.         through Alt-K.    The <number> is the decimal ascii value of
  5734.         the packet mark character to be used.
  5735.  
  5736.  ->       SET KERMIT PADCHAR <number>
  5737.  
  5738.         SET KERMIT PADCHAR sets the pad character used in KERMIT
  5739.         transfers.  This value may be inspected and changed through
  5740.         Alt-K.    The <number> is the decimal ascii value of the pad
  5741.         character to be used.
  5742.  
  5743.  ->       SET KERMIT PADNUM number
  5744.  
  5745.         SET KERMIT PADNUM sets the number of pad characters (if
  5746.         any) to be used during KERMIT transfers.  This value may be
  5747.         inspected and changed through Alt-K.
  5748.  
  5749.        SET KERMIT REPEAT <number>
  5750.  
  5751.         SET KERMIT REPEAT sets the repeat quote character used in
  5752.         KERMIT transfers.  This value may be inspected and changed
  5753.         through Alt-K.    The <number> is the decimal ascii value of
  5754.         the repeat quote character to be used.
  5755.  
  5756.        SET KERMIT WINDOW <number>
  5757.  
  5758.         SET KERMIT WINDOW sets the maximum window size for KERMIT
  5759.         transfers.  A window maximum of 0 stops windowed transfers.
  5760.         COM-AND places an upper limit on this size (currently the
  5761.         limit is 8).
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774. Version 2.7: 901015
  5775.  
  5776. COM-AND: IBM PC Communication Script Language                 Page 101
  5777.  
  5778.  
  5779. VI.    SET Commands (continued)
  5780.  
  5781.  
  5782.     D. SET ZMODEM subcommands
  5783.  
  5784.        SET ZMODEM AUTO (ON!OFF)
  5785.  
  5786.         ZMODEM download is capable of automatically starting when
  5787.         the sender begins transmission.  You may control whether
  5788.         COM-AND will automatically begin the receive.  [Note that
  5789.         during scripted operation, auto-ZMODEM only occurs when the
  5790.         display is being performed.]
  5791.  
  5792.        SET ZMODEM BLOCK <number>
  5793.  
  5794.         SET ZMODEM BLOCK sets a maximum blocksize for ZMODEM sends.
  5795.         When a blocksize is set (rather than negotiated), the trans-
  5796.         fer reverts to half duplex (send, ACK, send, ACK).  This is
  5797.         provided for special cases (badly errored lines).  It is not
  5798.         recommended.
  5799.  
  5800.        SET ZMODEM RECOVER (ON!OFF)
  5801.  
  5802.         SET ZMODEM RECOVER enables and disables ZMODEM's recovery
  5803.         feature.  When a receive is intended for an existing file
  5804.         (intended to be a the result of a previous, failed, trans-
  5805.         fer), the transfer will pick up at the end of file (where the
  5806.         last one stopped), if enabled.    When disabled, transfers go
  5807.         to a unique file name ($ terminated as required).
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813.  
  5814.  
  5815.  
  5816.  
  5817.  
  5818.  
  5819.  
  5820.  
  5821.  
  5822.  
  5823.  
  5824.  
  5825.  
  5826.  
  5827.  
  5828.  
  5829. Version 2.7: 901015
  5830.  
  5831. COM-AND: IBM PC Communication Script Language                 Page 102
  5832.  
  5833.  
  5834. VII.    String Intrinsics
  5835.  
  5836.  
  5837.     Certain string values are treated as having an intrinsic meaning
  5838.     by the script processor.  All intrinsic string values must have
  5839.     an underscore ("_") in column 0 of the string, and otherwise be
  5840.     alone in the string (note that only the first 4 characters of the
  5841.     intrinsic keyword are significant).   For example:
  5842.  
  5843.          S0 = "_Date"            ; is equivalent to
  5844.          S0 = "_DateToday"       ; .. where contiguous text is ignored
  5845.  
  5846.     But  S0 = "_Date today" would not be treated as containing an
  5847.     intrinsic value.
  5848.  
  5849.     When the script processor encounters an intrinsic function, it
  5850.     replaces the value with the computed value.  String intrinsic
  5851.     functions are:
  5852.  
  5853.  
  5854.     _ABLA         ASCII Blankexpand flag
  5855.     _ACCF         Current accessory file
  5856.     _ACHA         ASCII Character pace delay (ms)
  5857.     _ADVE         ADVErt Flag on/off
  5858.     _AECH         ASCII Echo flag
  5859.     _AFLO         ASCII Flow control flag
  5860.     _ALAR         ALARm Flag on/off
  5861.     _ALIN         ASCII Line pace time (.01 ms)
  5862.     _ALLO         0,1,2... number of dynamic variables allocated
  5863.     _APAC         ASCII Pace character (Decimal ASCII value)
  5864.     _AQUI         ASCII Quiet flag
  5865.     _ATAB         ASCII tab expand flag
  5866.     _ATIM         Alarm time (secs)
  5867.     _AUPZ         ASCII Send ctl-z flag (STRIP!SEND)
  5868.     _BAR         (numeric) Status line color attribute
  5869.     _BELL         Bell tone (hz)
  5870.     _BKSC         Backscreen buffer size (pages)
  5871.     _BREA         Break duration (ms)
  5872.     _BSIN         Backspace IN (NONDESTRUC!DESTRUC)
  5873.     _BSOU         Backspace out (BACKSP!DELETE)
  5874.     _BSUP         BSUPpress Flag on/off
  5875.     _CALL         Last dialed dialing directory entry
  5876.     _CDIS         Control-char display flag on/off
  5877.     _CDRE         CDREspect Flag on/off
  5878.     _CHAT         CHAT Flag on/off
  5879.     _CHLI         Chat lines
  5880.     _CLFI         Call Log file name
  5881.  
  5882.  
  5883.  
  5884. Version 2.7: 901015
  5885.  
  5886. COM-AND: IBM PC Communication Script Language                 Page 103
  5887.  
  5888.  
  5889. VII.    String Intrinsics (continued)
  5890.  
  5891.  
  5892.     _CLOC         CLOCk Flag on/off
  5893.     _CLOG         CLOGging Flag on/off
  5894.     _COLO         Color flag on/off
  5895.     _CONN         Connection (formatted: Y/N)
  5896.     _CRLF         CR -> CRLF flag (ON, OFF values, ON = CR->CRLF)
  5897.     _DATE         Current date (formatted: mm/dd/yyyy)
  5898.     _DBLC         Double click interval in MS
  5899.     _DEFA         (numeric) Menu window color attribute
  5900.     _DIRF         Current dialing file
  5901.     _DLDI         Read current download drive:subdirectory
  5902.     _DOW         Day of week (0 -> Sunday, 1 -> Monday, etc)
  5903.     _DPRE         Dialing prefix (from Alt-S)
  5904.     _DROP         Drop DTR flag
  5905.     _DSUF         Dialing suffix (from Alt-S)
  5906.     _DUPL         Duplex setting (HALF!Full)
  5907.     _EFFI         Last transfer efficiency
  5908.     _ELAP         Elapsed time since call (formatted hh:mm:ss:tt)
  5909.     _EMUL         EMULATION (TTY!ANSI!VIDTEX!...)
  5910.     _ERRO         Last transfer error text (formatted: nn: text)
  5911.     _EXIT         Return current exit script name
  5912.     _EXQU         EXit QUery Flag on/off
  5913.     _FLOW         (soft) FLOW Flag on/off
  5914.     _HARD         Hardware flow control flag
  5915.     _HMOU         Mouse horiz (mickeys)
  5916.     _IFIL         FOPENI (script input) file name
  5917.     _INAF         Init modem after hangup on/off
  5918.     _K8QU         KERMIT 8 bit quote
  5919.     _KBDB         KBDBuf Flag on/off
  5920.     _KCHK         KERMIT Block check
  5921.     _KCQU         KERMIT control quote char
  5922.     _KEOL         KERMIT EOL char
  5923.     _KMAR         KERMIT Mark char
  5924.     _KNUM         KERMIT number pads
  5925.     _KPAD         KERMIT pad char
  5926.     _KREP         KERMIT Repeat char
  5927.     _KWIN         KERMIT max window
  5928.     _LEGE         Returns last LEGEND string displayed (or null)
  5929.     _LOGG         LOGging Flag on/off
  5930.     _LOGH         LOG Held Flag on/off
  5931.     _LOGM         LOGMarked Flag on/off
  5932.     _MACF         Current macro file
  5933.     _MASK         (7 bit) MASK Flag on/off
  5934.     _MCON         Modem connect string (from Alt-S)
  5935.     _MDCH         Modem delay char
  5936.     _MDEL         Modem character delay (ms)
  5937.  
  5938.  
  5939. Version 2.7: 901015
  5940.  
  5941. COM-AND: IBM PC Communication Script Language                 Page 104
  5942.  
  5943.  
  5944. VII.    String Intrinsics (continued)
  5945.  
  5946.  
  5947.     _MENU         Menu mode Flag on/off
  5948.     _MESC         Modem escape string (from Alt-S)
  5949.     _METH         Last transfer method
  5950.     _MHAN         Modem hangup string (from Alt-S)
  5951.     _MINI         Modem initialization string (from Alt-S)
  5952.     _MOUS         Return mouse presence: YES/NO
  5953.     _MUSI         MUSIc Flag on/off
  5954.     _NULL         Null value (empty string)
  5955.     _OFIL         FOPENO (script output) file name
  5956.     _ONES         Current ON ESCAPE GOSUB label (8 characters)
  5957.     _OVER         Return OVERLAY file name last loaded (or null)
  5958.     _PARM         Current comm parms (formatted as COMPARM statement)
  5959.     _PCJR         PCJR Flag on/off
  5960.     _PRIN         PRINter Flag on/off
  5961.     _QUIE         QUIEt Flag on/off
  5962.     _RDEL         Reconnect delay (secs)
  5963.     _RDIS         RDISplay Flag on/off
  5964.     _RDMA         ReDial MAximum value (0 -> no limit set)
  5965.     _RDPN         ReDial Pass Number on which CONNECT last occurred
  5966.     _RECH         RECHo Flag on/off
  5967.     _REMA         Remapping on/off
  5968.     _REMO         REMOte Flag on/off
  5969.     _RLEO         RLEOk Flag on/off
  5970.     _RTSD         RTSDiscipline Flag on/off
  5971.     _RTSF         RTSFlow control on/off (a type of hdwe flow control)
  5972.     _RUNT         Return Runtime invocation: YES/NO (see below)
  5973.     _SCRI         Current script file name
  5974.     _SILE         Duration (in MS) of ON SILENCE timeout
  5975.     _SIZE         Last transfer size
  5976.     _SLOW         SLOW Flag on/off
  5977.     _SSIZ         Current screen size (# lines)
  5978.     _SUBD         Read current drive:subdirectory
  5979.     _SWRI         Screen write (DOS!BIOS!DIRECT)
  5980.     _TEXT         (numeric) Text window color attribute
  5981.     _TIME         Current time (formatted: hh:mm:ss:tt)
  5982.     _TRAN         In/Out Translate on/off
  5983.     _TRFI         Last transfered file (except multiple transfers)
  5984.     _TRTI         Last transfer time
  5985.     _TTHR         TTHRu Flag on/off
  5986.     _UART         Return UART type (-1,0,...3: see below)
  5987.     _VMOU         Mouse vert (mickeys)
  5988.     _XSUI         Transfer screen update interval
  5989.     _ZAUT         ZMODEM auto download flag
  5990.     _ZBLO         ZMODEM maximum blocksize
  5991.     _ZREC         ZMODEM download recovery flag
  5992.  
  5993.  
  5994. Version 2.7: 901015
  5995.  
  5996. COM-AND: IBM PC Communication Script Language                 Page 105
  5997.  
  5998.  
  5999. VII.    String Intrinsics (continued)
  6000.  
  6001.  
  6002.     Intrinsic returned values are left justified in the string (with the
  6003.     exception of "_PARM", which does not justify " 300" in the string).
  6004.  
  6005.  
  6006.     The returned value may or may not be blank padded.  [Blank padding
  6007.     is of concern in some cases.  The construction 'Sx = Sx&""' may be
  6008.     used to remove trailing spaces.]
  6009.  
  6010.  
  6011.     Note that when a batch file transfer is performed (e.g.  KERMIT),
  6012.     only the last file name transfered is reported.
  6013.  
  6014.  
  6015.     In the case of ZMODEM and YMODEM-Batch the file name is always null,
  6016.     by definition of the protocols.
  6017.  
  6018.  
  6019.     The file transfer intrinsics only refer to binary protocols.  They do
  6020.     not report ASCII transfers.
  6021.  
  6022.  
  6023.     The "_UART" intrinsic returns the values -1,0,1...3 according to the
  6024.     UART type found when the current port was opened.  These values mean:
  6025.  
  6026.          -1 -> No UART was detected
  6027.           0 -> 8250 type UART detected (NO FIFO bufferring)
  6028.         1/2 -> 16450/16500 UART detected (NO FIFO bufferring)
  6029.           3 -> 16550A type UART detected (FIFO bufferring)
  6030.  
  6031.  
  6032.     The "_RUNT" intrinsic may be used to distinguish automatic scripts
  6033.     (COM-AND.CMD and INSTALL.CMD) from all other scripts.  These scripts
  6034.     are automatically invoked at run-time (INSTALL being invoked only in
  6035.     certain cases).  "_RUNT" returns YES during automatic run-time
  6036.     scripts.
  6037.  
  6038.  
  6039.  
  6040.  
  6041.  
  6042.  
  6043.  
  6044.  
  6045.  
  6046.  
  6047.  
  6048.  
  6049. Version 2.7: 901015
  6050.  
  6051. COM-AND: IBM PC Communication Script Language                 Page 106
  6052.  
  6053.  
  6054. VIII.    Script Errors
  6055.  
  6056.  
  6057.     Errors are reported in the form:  <line #>: <error text>
  6058.  
  6059.     Error texts are:   Invalid token
  6060.  
  6061.                Unexpected end of file
  6062.  
  6063.                Unexpected token
  6064.  
  6065.                Missing token
  6066.  
  6067.                Stack overflow
  6068.  
  6069.                Stack underflow
  6070.  
  6071.                Unexpected characters at end of line
  6072.  
  6073.                Unexpected CASE
  6074.                Unexpected DEFAULT
  6075.                Unexpected ENDCASE
  6076.                Unexpected ENDSWITCH
  6077.                Unexpected ELSE
  6078.                Unexpected ENDIF
  6079.                Unexpected RETURN
  6080.                Unexpected ENDFOR
  6081.                Unexpected UNTIL
  6082.                Unexpected ENDWHILE
  6083.                Unexpected FRETURN
  6084.  
  6085.  
  6086.     Note:  COM-AND does not terminate in all cases where an error is
  6087.     encountered.  Stack over/underflow errors always terminate a
  6088.     script, as do the unexpected CASE/DEFAULT/ENDCASE/ENDSWITCH/
  6089.     ELSE/ENDIF/RETURN errors.  Unexpected end-of-file (when a GOTO
  6090.     branches to a label that does not exist) terminates the script.
  6091.     Other errors do not terminate the script.
  6092.  
  6093.  
  6094.     Note: PROCOMM does not accept a command on a labelled line.
  6095.     However, PROCOMM does not issue an error message at that point
  6096.     either.  COM-AND will report 'unexpected characters at end of
  6097.     line' when this is encountered, and ignore the command.
  6098.  
  6099.  
  6100.  
  6101.  
  6102.  
  6103.  
  6104. Version 2.7: 901015
  6105.  
  6106. COM-AND: IBM PC Communication Script Language                 Page 107
  6107.  
  6108.  
  6109. IX.    ASPECT and PROCOMM 2.4.2 scripts
  6110.  
  6111.  
  6112.     COM-AND will execute most scripts written for PROCOMM 2.4.2 and for
  6113.     the ASPECT script language (tm DataStorm).  However, the ASPECT
  6114.     language is only a subset of the COM-AND script language.  Although
  6115.     COM-AND will execute most PROCOMM scripts, PROCOMM will not execute
  6116.     most COM-AND scripts.  To retain ability to execute a script you
  6117.     write under PROCOMM:
  6118.  
  6119.        o     ONLY use statements marked '->' in the discussion above.
  6120.          These statements are compatible with the ASPECT language.
  6121.  
  6122.     o    ONLY use constructions highlighted '->' in the discussion above.
  6123.          For example:  COM-AND will accept (and PROCOMM won't):
  6124.  
  6125.          STRCAT S0 S1(5:10)      ; Extract substring and concatenate
  6126.  
  6127.     o    REFER to the PROCOMM document (or ASPECT manual for full dis-
  6128.          cussion of ANY statement you wish to employ.
  6129.  
  6130.     o    Avoid numeric variables N10-N99
  6131.  
  6132.     o    Avoid string variables S10-S29
  6133.  
  6134.     o    Avoid ALL string variables V0-Vn
  6135.  
  6136.     o    Avoid ALL usage of FLAG variables
  6137.  
  6138.     o    Use full keywords;  do not abbreviate to 4 characters.
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.  
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.  
  6158.  
  6159. Version 2.7: 901015
  6160.  
  6161. COM-AND: IBM PC Communication Script Language                 Page 108
  6162.  
  6163.  
  6164. IX.    ASPECT and PROCOMM 2.4.2. scripts
  6165.  
  6166.  
  6167.     Unimplemented ASPECT commands
  6168.     -----------------------------
  6169.  
  6170.     Every attempt has been made to provide a script language that is
  6171.     compatible with PROCOMM.  However, certain commands do not apply to
  6172.     COM-AND.  Others have been changed for more of less obvious reasons.
  6173.     Changes and optional usages have been highlighted above.
  6174.  
  6175.  
  6176.     The following ASPECT commands have not been implemented:
  6177.  
  6178.  
  6179.  *    HELP
  6180.  *    HOST
  6181.  *    KERMSERV FINISH
  6182.  *    KERMSERV GETFILE
  6183.  *    KERMSERV LOGOUT
  6184.  *    KERMSERV SENDFILE
  6185.  *    SET ASCII DN_CR (CR!CR_LF!STRIP)
  6186.  *    SET ASCII DN_LF (LF!CR_LF!STRIP)
  6187.  *    SET ASCII UP_CR (CR!CR_LF!STRIP)
  6188.  *    SET CR_OUT (CR!CR_LF)
  6189.  *    SET ENQ ON         ; SET ENQ OFF!CISB implemented
  6190.  *    SET HOSTPSWD <string>
  6191.  *    SET KERMIT PACKSIZE <number>
  6192.  *    SET KERMIT HANDSHAKE <number>
  6193.  *    SET KERMIT FILETYPE (TEXT!BINARY)
  6194.  *    SET SCROLL (ON!OFF)
  6195.  *    SET SHELLPSWD <string>
  6196.  *    SET SOUND (ON!OFF)
  6197.  *    SET TXPACE <number>  ; Partially implemented as SET ASCII CHARPACE
  6198.  *    SET WRAP (ON!OFF)
  6199.  *    SNAPSHOT
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.  
  6211.  
  6212.  
  6213.  
  6214. Version 2.7: 901015
  6215.  
  6216. COM-AND: IBM PC Communication Script Language                 Page 109
  6217.  
  6218.  
  6219. X.    Program Requirements
  6220.  
  6221.  
  6222.     This program will only function on an IBM PC or DOS compatible
  6223.     machine.  COM-AND does direct to screen buffer fetches and stores
  6224.     (unless BIOS screen updates are directed using the /C switch or the
  6225.     Alt-O options menu).
  6226.  
  6227.  
  6228.     COM-AND is TopView aware even without the /C switch or Alt-O option.
  6229.  
  6230.  
  6231.     COM-AND supports MDA, CGA, EGA and Hercules.  COM-AND uses a Micro-
  6232.     soft Mouse if one is available...
  6233.  
  6234.  
  6235.     COM-AND disk I/O is done through the 'Handle' oriented I/O routines
  6236.     added to DOS 2.0.  Therefore DOS 2.0 is a minimum requirement.
  6237.  
  6238.  
  6239.     COM-AND (Version 2.7) requires 252K for itself.  You need 384K
  6240.     minimally to use COM-AND and the DOS Gateway, and more to take
  6241.     advantage of accessories.
  6242.  
  6243.  
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269. Version 2.7: 901015
  6270.  
  6271. COM-AND: IBM PC Communication Script Language                 Page 110
  6272.  
  6273.  
  6274. XI.    Program and Author Information
  6275.  
  6276.  
  6277.     This program was written using Microsoft Macro-Assembler.  The
  6278.     author likes assembler.  Assembly language is an entirely
  6279.     appropriate vehicle for some of the program, and a not-inappro-
  6280.     priate vehicle for the rest of it.  Everything, in moderation...
  6281.  
  6282.  
  6283.     COM-AND has been written by, and is supported by R. Scott McGinnis
  6284.     of Chicago (CABER Software), Illinois.    My PLINK and GEnie IDs are:
  6285.     TARTAN.  My CIS ID is 73147,2665.  Comment and suggestions (and
  6286.     criticism in moderation) are welcomed:
  6287.  
  6288.              CABER Software
  6289.              R. (Scott) McGinnis
  6290.              P.O. Box 3607 Mdse Mart
  6291.              Chicago, IL 60654-0607
  6292.  
  6293.  
  6294.  
  6295.     I must thank Mike Todd and John Poindexter of the Source for their
  6296.     strenuous testing and excellent suggestions.  Mike and John have
  6297.     pushed me hard, and I thank them.  This script language is in large
  6298.     part shaped by these gentlemen.
  6299.  
  6300.  
  6301.     I also thank my wife, Elizabeth, who supported me whole-heartedly
  6302.     in this effort.  She is my lady and my love.
  6303.  
  6304.  
  6305.     This program (Version 2.7) may be distributed freely along with its
  6306.     accessories with the caveat that the Author information displayed at
  6307.     program termination is not removed.  If the program is USED after a
  6308.     reasonable period of evaluation, a registration of $35.00 is
  6309.     required.
  6310.  
  6311.  
  6312.     PROCOMM, PCPLus, and ASPECT are trademarks of the DataStorm cor-
  6313.     poration.  DSZ is a trademark of OMEN Technology.  Windows is a
  6314.     trademark of the MicroSoft Corporation.  DesqView is a trademark
  6315.     of the QuarterDeck Corporation.  Smartmodem is a trademark of the
  6316.     Hayes Corporation.
  6317.  
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324. Version 2.7: 901015
  6325.  
  6326. COM-AND: IBM PC Communication Script Language                 Page 111
  6327.  
  6328.  
  6329. A.    Example scripts
  6330.  
  6331.  
  6332.     A script to dial a modem direct, send two carriage returns, and
  6333.     wait for a logon prompt looks like:
  6334.  
  6335.     ------------------------------------------------------------------
  6336.     DEFTIME "60"            ; Wait 60 seconds for an incoming string
  6337.     IF NOT LINKED        ; If script not invoked from Alt-D
  6338.        MESSAGE "^GDialing direct"
  6339.        DIAL "1"             ; Call dial dir entry number 1 (PLINK)
  6340.        IF FAILED        ; IF esc out
  6341.           EXIT        ; terminate script
  6342.           ENDIF        ; End if failed
  6343.        ENDIF        ; End if not linked
  6344.  
  6345.     PAUSE "5"               ; Wait for the modem to settle down
  6346.     TRANSMIT "!"            ; Transmit Carriage return <CR>
  6347.     PAUSE "1"               ; Wait 1 sec
  6348.     TRANSMIT "!"            ; Transmit Carriage return <CR>
  6349.     WAITFOR "USER ID:"      ; Wait for the 'USER ID' prompt
  6350.  
  6351.     SET BSUPPRESS OFF    ; Turn off blank line suppression
  6352.     SET MASK ON        ; Turn on high bit mask
  6353.     SET CDISPLAY ON     ; Display control characters
  6354.     ALARM            ; Sound alarm:    we're done
  6355.     -------------------------------------------------------------------
  6356.  
  6357.  
  6358.  
  6359.  
  6360.  
  6361.  
  6362.  
  6363.  
  6364.  
  6365.  
  6366.  
  6367.  
  6368.  
  6369.  
  6370.  
  6371.  
  6372.  
  6373.  
  6374.  
  6375.  
  6376.  
  6377.  
  6378.  
  6379. Version 2.7: 901015                           Appendices
  6380.  
  6381. COM-AND: IBM PC Communication Script Language                 Page 112
  6382.  
  6383.  
  6384. A.    Example scripts (continued)
  6385.  
  6386.  
  6387.     A script to dial GEnie, and logon makes special provisions to turn
  6388.     echo off (mask it, anyway) during logon:
  6389.  
  6390.     ------------------------------------------------------------------
  6391.     DEFTIME "60"            ; Wait 60 seconds for an incoming string
  6392.     IF NOT LINKED        ; If not from Alt-d
  6393.        MESSAGE "^GDialing GEnie direct"
  6394.        DIAL "4"             ; Call dial dir entry number 4 (GEnie)
  6395.        IF FAILED        ; IF esc out
  6396.           EXIT        ; terminate script
  6397.           ENDIF        ; Endif failed
  6398.        ENDIF        ; End test if linked
  6399.  
  6400.     PAUSE "3"               ; Wait for the modem to settle down
  6401.     TRANSMIT "hhh"          ; Transmit
  6402.     WAITFOR "U#="           ; Wait for the 'USER ID' prompt
  6403.  
  6404.     SET BSUPPRESS ON    ; Turn on blank line suppression
  6405.     SET MASK ON        ; Turn on high bit mask
  6406.     SET CDISPLAY OFF    ; Control character display
  6407.     SET DUPLEX FULL     ; Turn off local echo for ID/psw
  6408.     ALARM            ; Sound alarm
  6409.  
  6410.     MESSAGE "^MEnter ID,password for GEnie:"
  6411.     MGET S0         ; Get ID/psw
  6412.     TRANSMIT S0        ; Transmit ID/psw
  6413.     TRANSMIT "^M"           ; .. and a final c/r
  6414.     SET DUPLEX HALF     ; Turn echo back on
  6415.     ------------------------------------------------------------------
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434. Version 2.7: 901015                           Appendices
  6435.  
  6436. COM-AND: IBM PC Communication Script Language                 Page 113
  6437.  
  6438.  
  6439. A.    Example scripts (continued)
  6440.  
  6441.  
  6442.     A script to dial Telenet (entry number 10 in the dialing directory
  6443.     assumed, and make connection according to the parameters set
  6444.     looks like:
  6445.  
  6446.     ------------------------------------------------------------------
  6447.     LEGEND " Dialing Telenet... "
  6448.     DEFTIME "60"            ; Wait 60 seconds for an incoming string
  6449.     IF NOT LINKED        ; If script not invoked from Alt-D
  6450.        DIAL "10"            ; Call dial dir entry number 10 (Telenet)
  6451.        IF FAILED        ; IF esc out
  6452.           EXIT        ; terminate script
  6453.           ENDIF        ; End if failed
  6454.        ENDIF        ; End if not linked
  6455.  
  6456.     COMPARMS S1            ; Get current settings
  6457.     IF STRCMP "N" S1(5:5)           ; If no parity
  6458.        IF STRCMP "2400" S1(0:3)     ; If 2400 baud connect Send @D<cr>
  6459.           PAUSE 1            ;    Wait for the modem to settle
  6460.           TRANS "@"                 ;    Send @D<cr> slowly
  6461.           PAUSE 1            ;    Wait a moment
  6462.           TRANS "D"                 ;    Set to 8N1
  6463.           PAUSE 1            ;    Wait a moment
  6464.        ELSE             ; ELSE 300/1200 (send <cr>D<cr>)
  6465.           PAUSE "1"                 ;    Wait for the modem to settle
  6466.           TRANSMIT "!D"             ;    Transmit Carriage return <CR> D
  6467.           ENDIF
  6468.     ELSE                ; ELSE even or odd parity
  6469.        PAUSE "1"                    ;    Wait for the modem to settle
  6470.        TRANSMIT "!"                 ;    Transmit Carriage return <CR>
  6471.        ENDIF
  6472.     PAUSE "1"                       ; Wait 1 sec
  6473.     TRANSMIT "!"                    ; Transmit Carriage return <CR>
  6474.  
  6475.     WAITFOR "TERMINAL="     ; Wait for the prompt
  6476.     TRANSMIT "D1!"          ; Set terminal type
  6477.     WAITFOR "@"             ; Wait for next prompt
  6478.     SET BSUPPRESS OFF    ; Turn off blank line suppression
  6479.     SET MASK ON        ; Turn on high bit mask
  6480.     SET CDISPLAY ON     ; Display control characters
  6481.     ALARM            ; Sound alarm:    we're done
  6482.     ------------------------------------------------------------------
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489. Version 2.7: 901015                           Appendices
  6490.  
  6491. COM-AND: IBM PC Communication Script Language                 Page 114
  6492.  
  6493.  
  6494. B.    HOST and BBS scripts
  6495.  
  6496.  
  6497.     Supplied with this release of COM-AND are two large scripts.
  6498.     HOST.CMD supports a limited Host mode for callers to your PC;
  6499.     BBS.CMD supports a more extensive BBS function (with multiple users,
  6500.     mail, upload/download files, bulletins and so on).
  6501.  
  6502.  
  6503.     The advantage of a scripted HOST or BBS mode is flexibility.  You
  6504.     may use the script as supplied, or tailor it to your needs.  As the
  6505.     supplied scripts use a public domain graphic path display utility
  6506.     (TREED), you will want to remove the function (at least the prompt
  6507.     for it) if you don't have the program.  You may wish to add other
  6508.     functions.
  6509.  
  6510.  
  6511.     Documentation has been provided with each of the scripts.  For those
  6512.     interested in having a simple HOST mode, or a simple BBS, refer to
  6513.     the BBS&HOST archive included with this distribution.
  6514.  
  6515.  
  6516.     The supplied HOST and BBS scripts work best if your modem is set to
  6517.     report the real state of Carrier Detect (CD).  However, it has been
  6518.     used quite successfully with modems that report Carrier Detect
  6519.     always true (when disconnect occurs, Hayes compatible modems report
  6520.     the fact with 'NO CONNECT').
  6521.  
  6522.  
  6523.     These scripts are offered mostly as examples of the script language.
  6524.     Should you feel inclined to rewrite one or the other of these
  6525.     scripts, contact the author.  I would be happy to replace what I've
  6526.     included with a superior effort!
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544. Version 2.7: 901015                           Appendices
  6545.  
  6546. COM-AND: IBM PC Communication Script Language                 Page 115
  6547.  
  6548.  
  6549. C.    External protocol drivers
  6550.  
  6551.  
  6552.     COM-AND supports external protocol drivers through its F1 (access-
  6553.     ories) menu.  You may edit the entries in the F1 menu to load and
  6554.     execute just about any program you might wish (and have memory for).
  6555.     If you limit the F1 entries to simple script invocations, you may
  6556.     also use the script name through F2.
  6557.  
  6558.  
  6559.     For example, you might wish to use a different implementation of
  6560.     ZMODEM than COM-AND's.  [COM-AND implements a complete ZMODEM.  How-
  6561.     ever, some of the management and transfer options are not available
  6562.     through COM-AND.] You might do this with Chuck Forsberg's DSZ.COM
  6563.     program, if you have registered it.  DSZ is a module that may be run
  6564.     from within other comm programs to perform ZMODEM transfers (and
  6565.     X/Ymodem transfers too).  DSZ is revised quite often (to expand its
  6566.     function), and is available on most systems.
  6567.  
  6568.  
  6569.     For downloading purposes, no script is needed to invoke DSZ.  How-
  6570.     ever, as mentioned above, the F1 entry will be coded to use a script
  6571.     to allow the same script to be manual invoked through F2.  The file
  6572.     name used for the downloaded file will be determined by the sender.
  6573.     Revise an F1 entry (with the 'r' subcommand) as follows:
  6574.  
  6575.         Name:        Download using YMODEM
  6576.         Subdirectory:    (whatever subdirectory your DSZ occupies)
  6577.         Program:        (leave this field blank)
  6578.         Script:        DSZDOWN.CMD
  6579.  
  6580.     The script DSZDOWN.CMD could be written:
  6581.     ------------------------------------------------------------------
  6582.     COMPARMS S1        ; read current settings
  6583.     S2 =  "DSZ.COM port " * S1(14:14) * " rb " ; Ask for YMODEM rcv
  6584.     RUN S2            ; Load and run DSZ
  6585.     ------------------------------------------------------------------
  6586.     Note: change " rb " to " rz " for ZMODEM
  6587.     ------------------------------------------------------------------
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599. Version 2.7: 901015                           Appendices
  6600.  
  6601. COM-AND: IBM PC Communication Script Language                 Page 116
  6602.  
  6603.  
  6604. C.    External protocol drivers (continued)
  6605.  
  6606.  
  6607.     DSZ requires a file name for uploading.  You may accomplish this by
  6608.     editing the F1 menu as follows, and creating the following script
  6609.     to request a file name and load DSZ.
  6610.  
  6611.         Name:        Upload using YMODEM
  6612.         Subdirectory:    (whatever subdirectory DSZ/DSZUP occupies)
  6613.         Program:        (leave this field blank)
  6614.         Script:        DSZUP.CMD
  6615.     The script DSZUP.CMD could be written:
  6616.     ------------------------------------------------------------------
  6617.     MESSAGE "^MEnter the upload file name: "
  6618.     GET S0            ; Read keyboard
  6619.     COMPARMS S1        ; read current settings
  6620.     S2 =  "DSZ.COM port " * S1(14:14) * " sb " * S0 ; ask for YMODEM
  6621.     sb" RUN S2                  ; Load and run DSZ
  6622.     ------------------------------------------------------------------
  6623.     Note: change " sb " to " sz " for ZMODEM
  6624.     ------------------------------------------------------------------
  6625.  
  6626.  
  6627.     DSZ defaults to COM1 and your current baud rate.  The above scripts
  6628.     adjust for the comm port you're using.  The above scripts (or better)
  6629.     are included in the SCRIPTS.ARC file released with COM-AND.
  6630.  
  6631.  
  6632.     NOTE: DSZ is user supported.  If you use it, please register it!
  6633.     DSZ may be found on most bulletin boards, and on every major system.
  6634.     Registration information is provided with every release of DSZ.
  6635.  
  6636.  
  6637.     NOTE: More functional scripts for invocation of DSZ are included in
  6638.     the scripts ARC file released with COM-AND.  A pop-up window is used
  6639.     to query the file name, and so on.
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654. Version 2.7: 901015                           Appendices
  6655.  
  6656. COM-AND: IBM PC Communication Script Language                 Page 117
  6657.  
  6658.  
  6659. D.    Encoded music
  6660.  
  6661.  
  6662.     Beginning with version 2.3, COM-AND uses encoded music strings for
  6663.     several different purposes:
  6664.  
  6665.     .  If the file COM-AND.TUN exists on the default drive:subdirectory
  6666.        (or on the COM-AND= drive:subdirectory), and it contains a valid
  6667.        encoded music string (not to exceed 40 notes), COM-AND will use
  6668.        the encoded string for its alarm.
  6669.  
  6670.     .  The alarm tune may be changed with a "SET TUNE" command through
  6671.        a script file.  The new alarm tune holds until it is changed,
  6672.        or until COM-AND is terminated.
  6673.  
  6674.     .  A script may PLAY an encoded music string during its execution
  6675.        (up to 80 notes).
  6676.  
  6677.     .  An escape sequence to play music has been implemented (for some
  6678.        RBBS boards).  The escape sequence is "ESC [M <music string> ^N"
  6679.        allowing up to 255 characters for the <music string>.
  6680.  
  6681.  
  6682.     Music strings are encoded using the BASICA 2.0 PLAY statement syntax.
  6683.     Commands are single characters, followed by one or more parameters.
  6684.     Blanks and commas are allowed for readability.    Case is not signifi-
  6685.     cant.  Commands are:
  6686.  
  6687.     .  A through G:  Play a note in the current octave
  6688.  
  6689.        A note command plays a note in the current octave.  It may be
  6690.        optionally followed by: (1) # (sharp), + (sharp), and - (flat),
  6691.        (2) a duration value (1 through 64, see "L" below),  and (3) one
  6692.        or more periods (dotting) extending the duration by 3/2.  If no
  6693.        duration number is specified the duration is the current default
  6694.        (set by "L", beginning at 4 with each string).  Example:
  6695.  
  6696.         A-16    A-flat in the current octave (sixteenth note)
  6697.  
  6698.        Blanks and commas ARE NOT allowed within the note declaration;
  6699.        e.g. no blank should occur between the command and a flat/sharp.
  6700.  
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.  
  6709. Version 2.7: 901015                           Appendices
  6710.  
  6711. COM-AND: IBM PC Communication Script Language                 Page 118
  6712.  
  6713.  
  6714. D.    Encoded music (continued)
  6715.  
  6716.  
  6717.     .  O #        Set the current octave
  6718.  
  6719.        There are 7 octaves, numbered 0 through 6.  Middle-C begins octave
  6720.        number 3.  Each string defaults at the start to octave number 4.
  6721.  
  6722.     .  >        Raise the octave by 1
  6723.  
  6724.        The current octave is raised with this command.
  6725.  
  6726.     .  <        Lower the octave by 1
  6727.  
  6728.        The current octave is lowered with this command.
  6729.  
  6730.     .  N #        Play note number 0-84
  6731.  
  6732.        Each octave contains 12 notes (C,C#/D-,D,D#/E-, etc).  Notes are
  6733.        numbered from the 0th octave beginning with 1.  0 is a rest.
  6734.        Note numbers may be followed by duration (blank separated from
  6735.        the note number) and dotting as in the note command.  Example:
  6736.  
  6737.         N36 4.    Middle-C, 3/8ths (dotted quarter)
  6738.  
  6739.     .  L #        Set default duration for following notes
  6740.  
  6741.        The duration of a note is specified as a number, 1 through 64.
  6742.        L1 is a whole note, L2 is a half note, L3 is a triplet, L4 is
  6743.        a quarter note, and so on.  The actual duration (in time) for
  6744.        notes is set through the T (Tempo) command, below.
  6745.  
  6746.     .  P        Pause (rest)
  6747.  
  6748.        Rests may be encoded, using this command with duration and
  6749.        dotting as with the note command.  Example:
  6750.  
  6751.         P1.    Pause for a whole and a half
  6752.  
  6753.     .  T #        Tempo (number of quarter notes per minute)
  6754.  
  6755.        Tempo is specified as a count of quarter notes per minute.  The
  6756.        tempo is allowed to range between 32 and 255, defaulting to 120.
  6757.  
  6758.  
  6759.  
  6760.  
  6761.  
  6762.  
  6763.  
  6764. Version 2.7: 901015                           Appendices
  6765.  
  6766. COM-AND: IBM PC Communication Script Language                 Page 119
  6767.  
  6768.  
  6769. D.    Encoded music (continued)
  6770.  
  6771.  
  6772.     .  MN        Normal
  6773.  
  6774.        Each note plays 7/8ths of the time specified (1/8th silence).
  6775.  
  6776.     .  MS        Staccato
  6777.  
  6778.        Each note plays 3/4s of the time specified (1/4 period silence).
  6779.  
  6780.     .  ML        Legato
  6781.  
  6782.        Each note plays the full period specified.
  6783.  
  6784.  
  6785.     Each encoded music string is an entity itself.    Defaults are reset
  6786.     at the beginning of each string.  Defaults are: T120,O4,L4,MN
  6787.     For example, the DRAGNET "dum-dee-dum dum" might be played:
  6788.  
  6789.         PLAY "ms t250 o2 c2d8e-cp4g-1 p2 >c2d8e-cp4g-1 p2"
  6790.  
  6791.  
  6792.  
  6793.  
  6794.  
  6795.  
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.  
  6803.  
  6804.  
  6805.  
  6806.  
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819. Version 2.7: 901015                           Appendices
  6820.  
  6821. COM-AND: IBM PC Communication Script Language                 Page 120
  6822.  
  6823.  
  6824. E.    File transfer error numbers
  6825.  
  6826.  
  6827.     COM-AND reports file transfer errors with a number and an explanation
  6828.     on the screen.    When an error is logged to the call-log, however,
  6829.     COM-AND only logs a number.  Error numbers are:
  6830.  
  6831.     DOS errors:
  6832.  
  6833.      1  Invalid function number (from INT 21H)
  6834.      2  File not found
  6835.      3  Path not found
  6836.      4  Too many open files (no handles left)
  6837.      5  Access denied
  6838.      6  Invalid Handle
  6839.      7  Memory control blocks destroyed
  6840.      8  Insufficient memory
  6841.      9  Invalid Memory block address
  6842.     10  Invalid environment
  6843.     11  Invalid format
  6844.     12  Invalid access code
  6845.     13  Invalid data
  6846.     14  Short write.  Disc Full?  Error # generated here
  6847.     15  Invalid drive was specified
  6848.     16  Attempted to remove current directory
  6849.     17  Not same device
  6850.     18  No more files
  6851.  
  6852.  
  6853.  
  6854.  
  6855.  
  6856.  
  6857.  
  6858.  
  6859.  
  6860.  
  6861.  
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.  
  6869.  
  6870.  
  6871.  
  6872.  
  6873.  
  6874. Version 2.7: 901015                           Appendices
  6875.  
  6876. COM-AND: IBM PC Communication Script Language                 Page 121
  6877.  
  6878.  
  6879. E.    File transfer error numbers (continued)
  6880.  
  6881.  
  6882.     Program errors (internally generated):
  6883.  
  6884.      1  Other side cancelled        ; All
  6885.      2  Handshake failed            ; ..
  6886.      3  Block sequence error        ; ..
  6887.      4  Complement error            ; ..
  6888.      5  Checksum mismatch            ; ..
  6889.      6  CRC mismatch            ; ..
  6890.      7  Short block received        ; ..
  6891.      8  We cancelled            ; ..
  6892.      9  NAK rcvd/xmitted - retrying     ; ..
  6893.     10  Timeout                ; ..
  6894.     11  Cancelled by operator        ; ..
  6895.     12  Timeout waiting for rcvr ACK    ; ..
  6896.     13  ENQ received during block        ; CISB
  6897.     14  Unrecognized command received    ; ..
  6898.     15  ETX received            ; ..
  6899.     16  Buffer overflow            ; ..
  6900.     17  Wait ACK received from CIS        ; ..
  6901.     18  Send initiate received        ; Kermit
  6902.     19  File Header received        ; ..
  6903.     20  Send-initiate sent            ; ..
  6904.     21  End-of-transfer sent        ; ..
  6905.     22  Other side not using batch        ; Batch-Ymodem
  6906.     23  File name not received        ; ..
  6907.     24  Negotiation packet received     ; CIS Quick-B
  6908.     25  Application inquiry packet received ; CIS Quick-B
  6909.     26  Insufficent space for rcv        ; KERMIT/Batch YMODEM
  6910.     27  Carrier has been dropped        ; All
  6911.     28  ZMODEM frame end            ; ZMODEM (internal)
  6912.     29  ZMODEM encryption requested     ; ZMODEM
  6913.     30  ZMODEM file skipped         ; ZMODEM
  6914.     31  ZMODEM waiting recovery        ; ZMODEM (internal)
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.  
  6927.  
  6928.  
  6929. Version 2.7: 901015                           Appendices
  6930.  
  6931. COM-AND: IBM PC Communication Script Language                 Page 122
  6932.  
  6933.  
  6934. F.    EBL (Extended Batch Language)
  6935.  
  6936.  
  6937.     Extended Batch Language (EBL) is a command programming language that
  6938.     may be used as a direct replacement of DOS batch files.  It may also
  6939.     be used in conjunction with DOS batch files.
  6940.  
  6941.  
  6942.     A superb example of EBL's power may be seen in the system SIGCOM,
  6943.     which is a communications system for use in the IBMSIG on UNISON
  6944.     (originally created for The SOURCE).  SIGCOM uses EBL to integrate
  6945.     COM-AND with the editor EDWIN and Vern Buerg's LIST.
  6946.  
  6947.  
  6948.     One of the unique features of EBL is its global variables ( %A..%O ).
  6949.     String or numerical values may be assigned to the global variables
  6950.     through EBL batch files.  Once a value is assigned to one of these 15
  6951.     variables it is accessible to other EBL files until it is re-
  6952.     assigned.  This is a powerful feature which allows the passing of
  6953.     parameters from one EBL file to another.  COM-AND makes these global
  6954.     variables available for use in script files through its EBL script
  6955.     command.  The global variables are much more useful than variables in
  6956.     the DOS environment since the global variables are not dependent on
  6957.     whether they are assigned in a child or parent process.
  6958.  
  6959.  
  6960.     Global variables may be set by an EBL file run through COM-AND and
  6961.     then be available to other EBL files run through other COM-AND script
  6962.     files, or run from DOS after exiting COM-AND.  This is not true of
  6963.     normal DOS environment variables.  In a multi-tasking environment
  6964.     such as DESQview each window has its own DOS environment and there is
  6965.     no convenient way to pass DOS environment variables from one window
  6966.     to another.  With the COM-AND EBL command the capability exists to
  6967.     pass data from one window to COM-AND in another window through the
  6968.     EBL global variables.
  6969.  
  6970.  
  6971.     Extended Batch Language may be obtained from SEAWARE Corporation,
  6972.     P.O.  Box 1656, Delray Beach, FL 33444, 800-634-8188 or 407-392-2046.
  6973.     Registration fee is $49.  Extended Batch Language is copyrighted by
  6974.     Seaware Corp.  1982,83,84,85,86,87.
  6975.  
  6976.  
  6977.     The latest version of SIGCOM, the communication system for using the
  6978.     features of UNISON and the IBM Special Interest Group (IBMSIG), is
  6979.     always available from Mike Todd on UNISON via the ID MIKETODD or the
  6980.     IBMSIG EXCHANGE topics in PARTI for details on downloading or having
  6981.     diskettes mailed to your door.
  6982.  
  6983.  
  6984. Version 2.7: 901015                           Appendices
  6985.  
  6986. COM-AND: IBM PC Communication Script Language                 Page 123
  6987.  
  6988.  
  6989. G.    Manual settings and scripts
  6990.  
  6991.  
  6992.     1. Alt-S (Setup window)
  6993.  
  6994.        1)  Modem init string       SET MINIt <str>           _MINI
  6995.        2)  Modem dial prefix       SET DPREfix <str>           _DPRE
  6996.        3)  Modem dial suffix       SET DSUFfix <str>           _DSUF
  6997.        4)  Hang-up string           SET MHANg <str>           _MHAN
  6998.        5)  Escape string           SET MESCape <str>           _MESC
  6999.        6)  Connect string           SET MCONnect <str>           _MESC
  7000.        7)  Call log file           CLOG OPEN <str>           _CLFI
  7001.        8)  Dialing directory       DLOAD <str>               _DIRF
  7002.        9)  Macro directory           MLOAD <str>               _MACF
  7003.        10) RLE temp file           -----               -----
  7004.        11) Accessory direc           ALOAD <str>               _ACCF
  7005.        12) Backscreen Buffer       SET BKSC #               _BKSC
  7006.        13) Break delay           SET BREAK #               _BREA
  7007.        14) Alarm duration           SET ATIME #               _ATIM
  7008.        15) Modem character delay       SET MDELay #            _MDEL
  7009.        16) Reconnect delay           SET RDELay #            _RDEL
  7010.        17) Chat window size        SET CHLInes #           _CHLI
  7011.        18) Mouse vertical           SET VMOUse #            _VMOU
  7012.        19) Mouse horizontal        SET HMOUse #            _HMOU
  7013.        20) Mouse dbl click interval    SET DBLCLICK #           _DBLC
  7014.        21) Bell tone           SET BELL #               _BELL
  7015.        22) Modem delay character       SET MDCHAR #            _MDCH
  7016.        23) Xfer screen upd           SET XSUI #               _XSUI
  7017.  
  7018.        24) Save these values       UPDATE (*)               RESET
  7019.  
  7020.  
  7021.        (*) Note: UPDATE and RESET do not apply to these settings alone.
  7022.            Both commands (UPDATE and RESET) apply to ALL Alt-S, Alt-O,
  7023.            Alt-P, Alt-K, Alt-J settings.  RESET further closes and re-
  7024.            opens the comm port.
  7025.  
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039. Version 2.7: 901015                           Appendices
  7040.  
  7041. COM-AND: IBM PC Communication Script Language                 Page 124
  7042.  
  7043.  
  7044. G.    Manual settings and scripts (continued)
  7045.  
  7046.  
  7047.     2. Alt-O (Options window)
  7048.  
  7049.        1)  Echo received characters    SET DUPLEX HALF!FULL        _DUPL
  7050.        2)  Mask received characters    SET MASK ON!OFF           _MASK
  7051.        3)  Keyboard display        SET KBDBuf ON!OFF           _KBDB
  7052.        4)  Chat mode           SET CHAT ON!OFF           _CHAT
  7053.        5)  Suppress blank lines       SET BSUPpress ON!OFF        _BSUP
  7054.        6)  Alarm noise           SET ALARM ON!OFF           _ALAR
  7055.        7)  Exit query (Alt-X)       SET EXQUery ON!OFF           _EXQU
  7056.        8)  Mark transcript           LOG MARKED ON!OFF           _LOGM
  7057.        9)  Initial advertisement       SET ADVERT ON!OFF           _ADVE
  7058.        10) Use BIOS for screen saves   SET SWRITE BIOS!DIRECT      _SWRI
  7059.        11) Use DOS for screen writes   SET SWRITE DOS!BIOS!DIRECT  _SWRI
  7060.        12) Display control characters  SET CDISPlay ON!OFF           _CDIS
  7061.        13) Perform XON/XOFF Flow ctl   SET FLOW ON!OFF           _FLOW
  7062.        14) Perform hardware Flow ctl   SET HARD ON!OFF           _HARD
  7063.        15) Use RTS(hardware) Flow ctl  SET RTSF ON!OFF           _RTSF
  7064.        16) Drop DTR to hangup       SET DROP ON!OFF           _DROP
  7065.        17) Init modem after hangup       SET INAF ON!OFF           _INAF
  7066.        18) Translate (in and out)       SET TRANslate ON!OFF        _TRAN
  7067.        19) Keyboard remapping       SET REMAP ON!OFF           _REMA
  7068.        20) Nondestructive bksp       SET BACK IN (NOND!DEST)     _BSIN
  7069.        21) Send DELETE as bksp       SET BACK OUT (BACK!DELE)    _BSOU
  7070.        22) CR -> CRLF in display       SET CR CR!CRLF           _CRLF
  7071.        23) Call logging on           SET CLOG ON!OFF           _CLOG
  7072.        24) On screen clock           SET CLOCK ON!OFF           _CLOC
  7073.        25) Suppress bells           SET QUIET ON!OFF           _QUIE
  7074.        26) Menu mode           SET MENUMODE ON!OFF           _MENU
  7075.        27) Respect modem CD        SET CDRESpect ON!OFF        _CDRE
  7076.        28) PCJr (disc suspends comm)   SET PCJR ON!OFF           _PCJR
  7077.        29) Capture/display RLE files   SET RLEOk ON!OFF           _RLEO
  7078.        30) Allow MUSIC strings       SET MUSIC ON!OFF           _MUSI
  7079.        31) Allow REMOTE commands       SET REMOTE ON!OFF           _REMO
  7080.        32) Set slow xfer output       SET SLOW ON!OFF           _SLOW
  7081.        33) Auto ZMODEM download       SET ZMODEM AUTO ON!OFF      _ZAUT
  7082.        34) ZMODEM download recovery    SET ZMODEM RECOVER ON!OFF   _ZREC
  7083.  
  7084.        33) Save these values       UPDATE (*)               RESET
  7085.  
  7086.  
  7087.        (*) Note: UPDATE and RESET do not apply to these settings alone.
  7088.            Both commands (UPDATE and RESET) apply to ALL Alt-S, Alt-O,
  7089.            Alt-P, Alt-K, Alt-J settings.  RESET further closes and re-
  7090.            opens the comm port.
  7091.  
  7092.  
  7093.  
  7094. Version 2.7: 901015                           Appendices
  7095.  
  7096. COM-AND: IBM PC Communication Script Language                 Page 125
  7097.  
  7098.  
  7099. G.    Manual settings and scripts (continued)
  7100.  
  7101.  
  7102.     3. Alt-P (Parameters window)
  7103.  
  7104.        1)     300,E,7,1           SET BAUDRATE 300, +below    _PARM
  7105.        2)    1200,E,7,1           SET BAUDRATE 1200,+below     "
  7106.        3)    2400,E,7,1           SET BAUDRATE 2400,+below     "
  7107.        4)    4800,E,7,1           SET BAUDRATE 4800,+below     "
  7108.        5)    9600,E,7,1           SET BAUDRATE 9600,+below     "
  7109.        6)  19200,E,7,1           SET BAUDRATE 19K, +below     "
  7110.        ..    ..               ..                 "
  7111.        10)     300,N,8,1           SET BAUDRATE 300, +below     "
  7112.        11)    1200,N,8,1           SET BAUDRATE 1200,+below     "
  7113.        12)    2400,N,8,1           SET BAUDRATE 2400,+below     "
  7114.        13)    4800,N,8,1           SET BAUDRATE 4800,+below     "
  7115.        14)    9600,N,8,1           SET BAUDRATE 9600,+below     "
  7116.        15) 19200,N,8,1           SET BAUDRATE 19K, +below     "
  7117.        ..    ..               ..                 "
  7118.        19) EVEN               SET PARITY EVEN         "
  7119.        20) ODD               SET PARITY ODD         "
  7120.        21) NONE               SET PARITY NONE         "
  7121.        22) 7 bits               SET DATABITS 7         "
  7122.        23) 8 bits               SET DATABITS 8         "
  7123.        24) 1 bit               SET STOPBITS 1         "
  7124.        25) 2 bits               SET STOPBITS 2         "
  7125.        26) COM1               SET PORT COM1         "
  7126.        27) COM2               SET PORT COM2         "
  7127.        28) COM3               SET PORT COM3         "
  7128.        29) COM4               SET PORT COM4         "
  7129.        30) Set base/IRQ           SET COMBASE;    COMBASE <port> Nx
  7130.                        SET COMVECT;    COMVEC  <port> Nx
  7131.        31) Save               UPDATE (*, see Alt-S)       RESET
  7132.  
  7133.     4. Alt-K (KERMIT defaults window)
  7134.  
  7135.        1)  Mark character           SET KERMIT MARK #           _KMAR
  7136.        2)  Number of pads           SET KERMIT PADNUM #           _KNUM
  7137.        3)  Pad character           SET KERMIT PADCHAR #        _KPAD
  7138.        4)  Packet terminator       SET KERMIT EOLCHAR #        _KEOL
  7139.        5)  Control quote           SET KERMIT CQUOTE #           _KCQU
  7140.        6)  Binary quote           SET KERMIT 8QUOTE #           _K8QU
  7141.        7)  Check field len           SET KERMIT BLOCKCHECK 1!2!3 _KCHK
  7142.        8)  Compression flag        SET KERMIT REPEAT #           _KREP
  7143.        9)  Max window size           SET KERMIT WINDOW #           _KWIN
  7144.  
  7145.        10) Reset to default values       -----
  7146.        11) Save current values       UPDATE  (*, see Alt-S)      RESET
  7147.  
  7148.  
  7149. Version 2.7: 901015                           Appendices
  7150.  
  7151. COM-AND: IBM PC Communication Script Language                 Page 126
  7152.  
  7153.  
  7154. G.    Manual settings and scripts (continued)
  7155.  
  7156.  
  7157.     5. Alt-J (Colors window)
  7158.  
  7159.        1)  Color               SET COLOR ON!OFF           _COLO
  7160.        2)  Text foreground           COLOR <attr>, SET TEXT      _TEXT
  7161.        3)  Text background           "             "               "
  7162.        4)  Menu foreground           SET DEFAULT <attr>           _DEFA
  7163.        5)  Menu background           "                             "
  7164.        6)  Screen bar foreground       SET BAR <attr>           _BAR
  7165.        7)  Screen bar background       "                             "
  7166.  
  7167.        8)  Save these values       UPDATE (*, see Alt-S)       RESET
  7168.  
  7169.  
  7170.     6. Help (General help list)
  7171.  
  7172.        F1 -- Accessories           ACCESSORY #
  7173.        F10 - This screen           -----
  7174.  
  7175.        Alt-F10 - DOS Gateway       SHELL
  7176.        Ctl-End - Break           BREAK [#]
  7177.  
  7178.        F2 -- Perform script        EXECUTE <string>
  7179.        F3 -- Current d:subdir       CHDIR <string>
  7180.        F4 -- DLoad d:subdir        SET DLDIR <string>
  7181.        F5 -- ASCII Upload           SENDFILE ASCII <name>
  7182.        F6 -- ASCII Download        GETFILE ASCII <name>
  7183.        F7 -- Toggle disc log       LOG OPEN <str>,LOG CLOSE
  7184.        F8 -- Toggle KBD disp       SET KBDBuf ON!OFF
  7185.        F9 -- Toggle log hold       LOG SUSPEND, LOG RESUME
  7186.        PgUp  Upload a file           SENDFILE <method> ...
  7187.        PgDn  Download a file       GETFILE <method> ...
  7188.  
  7189.        Alt-0/9    Execute a macro       MACRO #
  7190.        Ctrl-PrtSc Toggles printer       SET PRINTER ON!OFF
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.  
  7199.  
  7200.  
  7201.  
  7202.  
  7203.  
  7204. Version 2.7: 901015                           Appendices
  7205.  
  7206. COM-AND: IBM PC Communication Script Language                 Page 127
  7207.  
  7208.  
  7209. G.    Manual settings and scripts (continued)
  7210.  
  7211.  
  7212.     6. Help (continued)
  7213.  
  7214.        Alt-A - Toggle Chat mode       SET CHAT ON!OFF
  7215.        Alt-B - Redisplay           -----
  7216.        Alt-C - Clear screen        CLEAR <attr>
  7217.        Alt-D - Dial            DIAL #
  7218.        Alt-E - Toggle echo           SET DUPLEX FULL!HALF
  7219.        Alt-F - File directory       DIR
  7220.        Alt-G - Toggle blank-lines       SET BSUP ON!OFF
  7221.        Alt-H - Hang up           HANGUP
  7222.        Alt-I - Program info        VERSION Sx
  7223.        Alt-J - Set screen colors       above
  7224.        Alt-K - Set KERMIT parms       above
  7225.        Alt-L - Toggle 25/43 lines       SET 25, SET 43
  7226.        Alt-M - Define a macro       SET MACRO # <string>
  7227.        Alt-N - Encrypt/Decrypt       ENCRYPT ..., DECRYPT ...
  7228.        Alt-O - Set options           above
  7229.        Alt-P - Set comm params       above
  7230.        Alt-R - Redial last number       DIAL
  7231.        Alt-S - Initial values       above
  7232.        Alt-T - Time(s) and alarm       SET ALARM
  7233.        Alt-U - Annotate call log       CLOG <string>
  7234.        Alt-V - Emulation           EMULATE <method>
  7235.        Alt-W - Playback           TYPE <string>
  7236.        Alt-X - Terminate program       BYE
  7237.        Alt-Z - Toggle 7bit mask       SET MASK ON!OFF
  7238.  
  7239.  
  7240.  
  7241.  
  7242.  
  7243.  
  7244.  
  7245.  
  7246.  
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.  
  7259. Version 2.7: 901015                           Appendices
  7260.  
  7261. COM-AND: IBM PC Communication Script Language                 Page 128
  7262.  
  7263.  
  7264. H.    STACK and Macro keycodes
  7265.  
  7266.  
  7267.     COM-AND application keystrokes may be created in a script itself.
  7268.     The script must (1) turn off the keyboard, (2) stack the keystrokes
  7269.     and (3) terminate the script.  For example, making a script:
  7270.  
  7271.          SET TTHRU OFF        ; Turn off keyboard
  7272.          STACK "^@<SOURCE!"         ; Stack command to invoke F2
  7273.          EXIT            ; Terminate script to execute
  7274.  
  7275.     actually invokes the F2 (execute script) window, and passes the
  7276.     name "SOURCE" with a terminating carriage return to the F2 window.
  7277.     The ^@ indicates that the following character is to be interpreted
  7278.     as an 'extended keystroke', i.e. not-ASCII.  The extended
  7279.     character set is:
  7280.  
  7281.     Macro seq    Key     Macro seq      Key         Macro seq      Key
  7282.     ---------    ---     ---------    -----         ---------    -----
  7283.     ^@;          F1     ^@^^    Alt-A         ^@1    Alt-N
  7284.     ^@<          F2     ^@1    Alt-B         ^@^X    Alt-O
  7285.     ^@=          F3     ^@.    Alt-C         ^@^Y    Alt-P
  7286.     ^@>          F4     ^@ (space) Alt-D         ^@^P    Alt-Q
  7287.     ^@?          F5     ^@^R    Alt-E         ^@^S    Alt-R
  7288.     ^@@          F6     ^@!    Alt-F         ^@^_    Alt-S
  7289.     ^@A          F7     ^@"        Alt-G        ^@^T       Alt-T
  7290.     ^@B          F8     ^@#    Alt-H         ^@^V    Alt-U
  7291.     ^@C          F9     ^@^W    Alt-I         ^@/    Alt-V
  7292.     ^@D         F10     ^@$    Alt-J         ^@^Q    Alt-W
  7293.     ^@I        PgUp     ^@%    Alt-K         ^@-    Alt-X
  7294.     ^@Q        PgDn     ^@&    Alt-L         ^@^U    Alt-Y
  7295.     ^@u     Ctl-End     ^@2    Alt-M         ^@,    Alt-Z
  7296.  
  7297.     Note, too, that Alt-A (requiring "^^") is unprogrammable.  It may
  7298.     be entered as decimal 30 (use Alt and numeric pad keys).
  7299.  
  7300.  
  7301.     In the above example, the F2 key was represented by "^@<".  When the
  7302.     F2 key is pressed a window is opened and a search for all files *.CMD
  7303.     and *.ENF takes place.    In simpler terms, pressing the F2 key takes
  7304.     TIME.  COM-AND defines the ASCII value 255 as a short cut to execute
  7305.     a script.  The macro:  " SOURCE!" has the same effect, and doesn't
  7306.     open the script window.  If the first character following the 255 is
  7307.     ".", the text will be executed as a single script command.  Other-
  7308.     wise, the text is interpreted as a script file name to be executed.
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314. Version 2.7: 901015                           Appendices
  7315.  
  7316. COM-AND: IBM PC Communication Script Language                 Page 129
  7317.  
  7318.  
  7319. I.    Dynamic String Variables
  7320.  
  7321.  
  7322.     With version 2.6, script authors may now ALLOCATE string variables
  7323.     in addition to the 30 static string variables always available.  The
  7324.     variables are used as V0,V1,...  and may be used in any statement now
  7325.     now supporting static string variables (S0,S1...).  There are a few
  7326.     differences, however.
  7327.  
  7328.     o    Allocated variables must be ALLOCATEd before they are used,
  7329.         once in a COM-AND session.  They do NOT necessarily need to
  7330.         be ALLOCATEd in the script that invokes them, however.
  7331.     o    Allocated variables are NOT deallocated when a script ends.
  7332.     o    Allocated variables are NOT cleared when a script terminates.
  7333.         One script may set values and a second may read them.
  7334.     o    Allocated variables ARE deallocated when COM-AND terminates.
  7335.  
  7336.  
  7337.     Dynamic variables are allocated from free memory, over and above the
  7338.     memory used by COM-AND normally.  Therefore, not all PC installations
  7339.     will allow dynamic allocation.    The ALLOCATE and LOAD ALLOCAT state-
  7340.     ments return SUCCESS/FAIL according to the result of the operation.
  7341.     A script author should only ALLOCATE as many variables (limited to
  7342.     100 max) as absolutely needed.
  7343.  
  7344.  
  7345.     Some large script systems will ALLOCATE variables and expect the area
  7346.     to be available during an entire COM-AND session.  Other scripts will
  7347.     have need for extended variables, but only during the single script's
  7348.     execution.  In a one-time case, the following is suggested:
  7349.  
  7350.     On initialization:
  7351.  
  7352.     DELETE "Script.dat"             ; Delete this script's save file
  7353.     STORE ALLOC "Script.dat"        ; Save current allocation, if any
  7354.     ALLOCATE <number>        ; Deallocate and allocate anew
  7355.     IF FAILED            ; If allocation failed
  7356.        MESS "Cannot allocate memory for variables"
  7357.        ...
  7358.        ENDIF
  7359.  
  7360.     On termination:
  7361.  
  7362.     DEALLOCATE            ; Clear our allocation
  7363.     IF ISFILE "Script.dat"          ; If something previously allocated
  7364.        LOAD ALLOCATED "Lister.dat"
  7365.        DELETE "Lister.dat"          ; Delete same file
  7366.        ENDIF
  7367.  
  7368.  
  7369. Version 2.7: 901015                           Appendices
  7370.  
  7371. COM-AND: IBM PC Communication Script Language                 Page 130
  7372.  
  7373.  
  7374. I.    Dynamic String Variables (continued)
  7375.  
  7376.  
  7377.     For the author preparing a suite of scripts expecting dynamic
  7378.     variables to be prepared prior to any one script's execution, it is
  7379.     suggested that one dynamic variable (say V0) contain a string that
  7380.     identifies the script-set.  Each script of the suite expecting the
  7381.     prepared area might then execute the following as it begins:
  7382.  
  7383.     IF NOT ALLOCATED        ; Somebody dealloc'd us
  7384.        LOAD ALLOC "Suite.dat"       ; Retrieve values from disc
  7385.        IF FAILED GOTO AllocErr    ; LOAD failed for some reason
  7386.        ENDIF
  7387.  
  7388.     IF NOT STRCMP V0 "My very own"
  7389.        LOAD ALLOC "Suite.dat"       ; Retrieve values from disc
  7390.        IF FAILED GOTO AllocErr    ; LOAD failed for some reason
  7391.        ENDIF
  7392.  
  7393.     ...                ; OK to proceed
  7394.  
  7395.  
  7396.     For this technique to be effective, the file containing dynamic
  7397.     variables must be updated by individual scripts as they exit.
  7398.  
  7399.  
  7400.     -------------------------------------------------------------------
  7401.     Note that the test for an allocated area is performed here BEFORE a
  7402.     dynamic variable (V0) is referenced.  The dynamic variables are valid
  7403.     syntactically ONLY when an area is allocated.  Because the interpre-
  7404.     tor evaluates ALL components of a condition, the following syntax,
  7405.     therefore, generates a syntax error when no area is allocated:
  7406.  
  7407.     IF NOT ALLOCATED or NOT STRCMP V0 "My very own"
  7408.        LOAD ALLOC "Suite.dat"       ; Retrieve values from disc
  7409.        IF FAILED GOTO AllocErr    ; LOAD failed for some reason
  7410.        ENDIF
  7411.  
  7412.  
  7413.     When "NOT ALLOCATED" is true, "NOT STRCMP V0 ..." is still executed.
  7414.     The reference to V0 in this case would therefore be a syntax error.
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424. Version 2.7: 901015                           Appendices
  7425.  
  7426. COM-AND: IBM PC Communication Script Language                 Page 131
  7427.  
  7428.  
  7429. J.    Flow control methods
  7430.  
  7431.  
  7432.     Some variations on flow control are available through COM-AND.    The
  7433.     discussion here centers on the script commands controlling flow con-
  7434.     trol...  Note SOFT, HARD, and RTS flow control default conditions
  7435.     may be set through Alt-O... whereas RTS discipline is script-only.
  7436.  
  7437.  
  7438.     1) XON/XOFF flow control:
  7439.  
  7440.        SET SOFTFLOW ON
  7441.        SET HARDFLOW OFF
  7442.        SET RTSDISCIPLINE ON     ; Default condition
  7443.        SET RTSFLOW OFF        ; Default condition
  7444.  
  7445.        This is the one everyone understands.  XOFFs are sent to tell the
  7446.        opposite side "whoa", and XON send to say "have at it".
  7447.  
  7448.  
  7449.     2) Hardware flow control (unidirectional):
  7450.  
  7451.        SET SOFTFLOW OFF
  7452.        SET HARDFLOW ON
  7453.        SET RTSDISCIPLINE ON     ; Default condition
  7454.        SET RTSFLOW OFF        ; Default condition
  7455.  
  7456.        This is the RS232 standard: COM-AND raises RTS before sending a
  7457.        character, and waits for the modem to raise CTS.  No provision is
  7458.        made for COM-AND to tell the modem "gimme a break, man".
  7459.  
  7460.  
  7461.     3) Hardware flow control (modified unidirectional):
  7462.  
  7463.        SET SOFTFLOW OFF
  7464.        SET HARDFLOW ON
  7465.        SET RTSDISCIPLINE OFF
  7466.        SET RTSFLOW OFF        ; Default condition
  7467.        SET RTS ...            ; Dynamically
  7468.  
  7469.        This is a curiosity implemented for some interesting devices that
  7470.        will not be discussed here.    This setting waits for CTS from the
  7471.        modem before sending, but gives control over RTS to a script.
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479. Version 2.7: 901015                           Appendices
  7480.  
  7481. COM-AND: IBM PC Communication Script Language                 Page 132
  7482.  
  7483.  
  7484. J.    Flow control methods (continued)
  7485.  
  7486.  
  7487.     4) Hardware flow control (bidirectional):
  7488.  
  7489.        SET SOFTFLOW OFF
  7490.        SET HARDFLOW ON
  7491.        SET RTSDISCIPLINE ON     ; Default condition
  7492.        SET RTSFLOW ON
  7493.  
  7494.        This is a bidirectional version of hardware flow control.  COM-AND
  7495.        waits for CTS before sending.  COM-AND raises and lowers RTS to
  7496.        signal its own buffer full conditions to the modem.
  7497.  
  7498.  
  7499.     5) Software AND hardware flow control (uni/bidirectional):
  7500.  
  7501.        SET SOFTFLOW ON
  7502.        SET HARDFLOW ON
  7503.        SET RTSDISCIPLINE ON     ; Default condition
  7504.        SET RTSFLOW ...        ; ON or OFF (bi/unidirectional)
  7505.  
  7506.        Soft and Hard flow control (hardware flow control being either
  7507.        uni- or bidirectional) may be selected.  In most cases this is
  7508.        the desired setting when the modem requires a hard flow control,
  7509.        and the protocol/carrier requires a soft flow control.
  7510.  
  7511.  
  7512.     The following modems require bidirectional hardware flow control:
  7513.  
  7514.         MultiTech "Multimodem V.32" (possibly all MultiTechs that support
  7515.         PC to modem interface at different speed from the modem to host)
  7516.  
  7517.         US Robotics Courier 9600 HST (???)
  7518.         Telebit T2500         (???)
  7519.  
  7520.  
  7521.  
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.  
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534. Version 2.7: 901015                           Appendices
  7535.  
  7536. COM-AND: IBM PC Communication Script Language                 Page 133
  7537.  
  7538.  
  7539. K.    Machine Language Subroutines
  7540.  
  7541.  
  7542.     The script statements OVERLAY and SCALL offer means to extend the
  7543.     script language at a script author's discretion.  Needless to say,
  7544.     however, not all systems will support OVERLAY, and development of an
  7545.     OVERLAY proper is difficult, dangerous, and frustrating.
  7546.  
  7547.  
  7548.     The OVERLAY statement loads an EXE or COM file as an overlay to
  7549.     COM-AND.  The size of the code/data being loaded as an overlay is
  7550.     limited by available memory.  [It is NOT limited to 64K.].  There-
  7551.     fore, a given overlay will not run on all systems... only those with
  7552.     sufficient available memory.
  7553.  
  7554.  
  7555.     An overlay is terminated when COM-AND terminates.  It may be cleared
  7556.     by a script itself, with the statement "OVERLAY CLEAR".  It is
  7557.     recommended that a script using overlay(s) terminate its overlay when
  7558.     the function is complete - the memory used for the overlay detracts
  7559.     from the space available for SHELL, and accessories.
  7560.  
  7561.  
  7562.     An overlay is entered with the SCALL instruction.  SCALL must specify
  7563.     the entry address relative to the first 64K of the overlay space.
  7564.     Thus, all entry points in an overlay MUST be in its first 64K.    The
  7565.     overlay is entered through a FAR CALL.    Thus, all entry points MUST
  7566.     be FAR procedures (with RETFs, not RETs).
  7567.  
  7568.  
  7569.     SCALL optionally specifies a parameter list to be passed to the over-
  7570.     lay procedure.    Parameters on this list are passed by reference
  7571.     through the stack.  Thus, all passed parameters MUST be simple
  7572.     variables (Nx, Sx, or Vx), and all passed parameters may be modified.
  7573.     On entry to an overlay procedure, the stack looks like:
  7574.  
  7575.  
  7576.  
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.  
  7587.  
  7588.  
  7589. Version 2.7: 901015                           Appendices
  7590.  
  7591. COM-AND: IBM PC Communication Script Language                 Page 134
  7592.  
  7593.  
  7594. K.    Machine Language Subroutines (continued)
  7595.  
  7596.  
  7597.     +------------------------+
  7598.     !    Segment (16 bits)     !
  7599.     +---              ---+
  7600.     !             ! SP+4n+2
  7601.     +------------------------+        1st parm if 1 or more passed
  7602.     !             !
  7603.     +---              ---+
  7604.     !    Offset (16 bits)     ! SP+4n
  7605.     +------------------------+
  7606.     //            //        ...
  7607.     +------------------------+
  7608.     !    Segment (16 bits)     !
  7609.     +---              ---+
  7610.     !             ! SP+6     3rd parm if 3 parm passed
  7611.     +------------------------+        2nd parm if 2 parm passed
  7612.     !             !        1st parm if 1 parm passed
  7613.     +---              ---+
  7614.     !    Offset (16 bits)     ! SP+4
  7615.     +------------------------+
  7616.     !    Segment (16 bits)     !
  7617.     +---              ---+
  7618.     !             ! SP+2
  7619.     +--- Return address   ---+        FAR CALL return address
  7620.     !             !
  7621.     +---              ---+
  7622.     !    Offset (16 bits)     ! SP+0
  7623.     +------------------------+
  7624.  
  7625.  
  7626.     Approximately 700 bytes of stack space are available when an overlay
  7627.     is entered.  An overlay requiring more stack space must provide its
  7628.     own stack (and mechanism to switch to its own stack when an overlay
  7629.     procedure is entered).
  7630.  
  7631.  
  7632.     The overlay may or may not pop the passed parameter references from
  7633.     the stack on return.  COM-AND resets the stack pointer as required.
  7634.     Similarly, the overlay procedure does not have to concern itself with
  7635.     saving and restoring certain registers.  COM-AND preserves all
  7636.     registers that it itself requires.
  7637.  
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644. Version 2.7: 901015                           Appendices
  7645.  
  7646. COM-AND: IBM PC Communication Script Language                 Page 135
  7647.  
  7648.  
  7649. K.    Machine Language Subroutines (continued)
  7650.  
  7651.  
  7652.     Parameters passed/returned to/from an overlay have the form:
  7653.  
  7654.     o    Nx: the reference Segment:offset points directly to the
  7655.         integer variable.  It is 16 bits, in the usual lsb,msb form.
  7656.  
  7657.     o    Sx,Vx: the reference Segment:offset points to character 0 of
  7658.         a string variable.  String variables are 80 bytes wide, null
  7659.         filled on the right if short.  Care must be take NOT to store
  7660.         past 80 characters, as there's NO telling what might be lost.
  7661.  
  7662.  
  7663.     Variables come from different segments.  The developer of a machine
  7664.     language subroutine cannot expect all passed variables to have the
  7665.     same segment reference.
  7666.  
  7667.  
  7668.     During an overlay, it should be noted that the BIOS comm support
  7669.     interrupt (for the comm port COM-AND has open) are redirected through
  7670.     COM-AND.  Thus, interrupt driven reads (at any speed supported by
  7671.     COM-AND) may be performed through COM-AND.  The BIOS 'open' for the
  7672.     comm port COM-AND has open is no-op'd.
  7673.  
  7674.  
  7675.     The development of a nontrivial overlay for a script is difficult, to
  7676.     say the least.    Obvious errors will lock the machine up tight, or
  7677.     render the environment (COM-AND) unstable.  Subtle errors may have
  7678.     the same effect, or worse.  Debugging an overlay is difficult.
  7679.  
  7680.  
  7681.     It is possible to develop an overlay using a high level language.
  7682.     However, each language compiler makes different provisions for the
  7683.     initialization of the environment.  An overlay, of course, does not
  7684.     automatically invoke the required initializations (e.g. 80x87
  7685.     emulation library routines).  The developer of any high level
  7686.     language routine serving as a foreign subroutine must take this into
  7687.     account.
  7688.  
  7689.  
  7690.     One final caution.  During the development of TALKER.OVL, this author
  7691.     found MicroSoft's EXEPACK to emit executable object that is not
  7692.     relocatable when loaded as an overlay.    This author does not
  7693.     recommend use of EXEPACK on overlay code until the code is proven to
  7694.     work, and then only with suspicion.
  7695.  
  7696.  
  7697.  
  7698.  
  7699. Version 2.7: 901015                           Appendices
  7700.  
  7701. COM-AND: IBM PC Communication Script Language                 Page 136
  7702.  
  7703.  
  7704. L.    CACMP
  7705.  
  7706.  
  7707.     Included with this release of COM-AND is a separate program, CACMP.
  7708.     Although CACMP has its own (separate document), it will be mentioned
  7709.     here, if only to refer the interested reader to CACMP.DOC.
  7710.  
  7711.  
  7712.     CACMP is a diagnostic and preprocessor for COM-AND scripts.  CACMP
  7713.     may be used simply to perform syntax and semantic review of a COM-AND
  7714.     script, or it may be used to strip/preprocess scripts for COM-AND.
  7715.  
  7716.  
  7717.     CACMP syntactically and semantically verifies a given script file.
  7718.     In addition, it will (optionally) perform the following functions:
  7719.  
  7720.         . Partially strip the script to output
  7721.         . Fully strip the script to output
  7722.         . Preprocess the script to output (for speed)
  7723.  
  7724.  
  7725.     The several levels of 'stripping', and 'preprocessing' are discussed
  7726.     in the CACMP documentation.  The interested reader is refered there.
  7727.  
  7728.  
  7729.  
  7730.  
  7731.  
  7732.  
  7733.  
  7734.  
  7735.  
  7736.  
  7737.  
  7738.  
  7739.  
  7740.  
  7741.  
  7742.  
  7743.  
  7744.  
  7745.  
  7746.  
  7747.  
  7748.  
  7749.  
  7750.  
  7751.  
  7752.  
  7753.  
  7754. Version 2.7: 901015                           Appendices
  7755.  
  7756. COM-AND: IBM PC Communication Script Language                 Page 137
  7757.  
  7758.  
  7759. M.    Script Language (Version 1.x)
  7760.  
  7761.  
  7762.     Version 1.x of PC-VCO included a primitive script facility.  That
  7763.     script language paralleled the original script language of PROCOMM
  7764.     version 1.x.  The only command whose meaning(s) changed was %F.  The
  7765.     %F paralleled the COM-AND Alt-P menu, as PROCOMM's %F paralleled its
  7766.     Alt-P menu.  Under most usages this make no difference.
  7767.  
  7768.     The introduction of the 2.x script processor retained the original
  7769.     script language as a subset.  A 1.x script command is signalled by a
  7770.     '%' sign.  The % must be followed by one, two or three alpha-numeric
  7771.     characters (no blanks) and possibly a quoted string (e.g.  "GENIE.
  7772.     CMD").  Text on a line not a part of a valid command is ignored.
  7773.     1.x script commands may not be mixed on a line with 2.x commands.
  7774.  
  7775.     As of version 2.7 of COM-AND the 1.x script processor is no longer
  7776.     available.  This appendix is provided for the decoding (should the
  7777.     need arise) of 1.x scripts.  The version 1.x command set was:
  7778.  
  7779.  ->    %A        Alarm
  7780.  ->    %B"str"         Default Drive/path
  7781.  ->    %C"nn"          Call directory number
  7782.  ->    %D"str"         DOS command
  7783.  ->    %En        Emulations:  unimplemented except for ANSI BBS
  7784.  *        %E0        Unimplemented
  7785.  *        %E1        Unimplemented
  7786.  *        %E2        Unimplemented
  7787.  *        %E3        Unimplemented
  7788.  *        %E4        Unimplemented
  7789.  *        %E5        Unimplemented
  7790.  *        %E6        Unimplemented
  7791.  ->        %E7        ANSI-BBS
  7792.  *        %E8        Unimplemented
  7793.  *        %E9        Unimplemented
  7794.  ->    %Fn        Comm Parms (equivalent to selection 'n' from Alt-P)
  7795.  ->    %G        Screen dump:  unimplemented
  7796.  ->    %H        Hang up
  7797.  ->    %I"str"         Wait for incoming string
  7798.  ->    %Jn        Send macro string 'n', n=0-9
  7799.  ->    %Ks        KERMIT server commands:  unimplemented
  7800.  *        %KMn        Unimplemented
  7801.  *        %KR        Unimplemented
  7802.  *        %KS"File_Name"  Unimplemented
  7803.  *        %KF        Unimplemented
  7804.  *        %KL        Unimplemented
  7805.  
  7806.  
  7807.  
  7808.  
  7809. Version 2.7: 901015                           Appendices
  7810.  
  7811. COM-AND: IBM PC Communication Script Language                 Page 138
  7812.  
  7813.  
  7814. M.    Script Language (Version 1.x, continued)
  7815.  
  7816.  
  7817.  ->    %Ls        Log commands
  7818.  ->        %LO "File_Name" Open log using "File_Name" (no default)
  7819.  ->        %LH        Hold logging
  7820.  ->        %LR        Resume logging
  7821.  ->        %LC        Close log
  7822.  ->    %M"str"         Display a message on the screen
  7823.  ->    %N"str"         Prompt for input and send
  7824.  ->    %Os        BIOS/Direct screen writes
  7825.  ->        %OB        Write to screen through BIOS
  7826.  ->        %OD        Write to screen direct
  7827.  ->    %P"nn"          Seconds to wait for an incoming string
  7828.  ->    %Q        Quit program
  7829.  ->    %R"nn"          Redial delay value
  7830.  ->    %Ss        Sound controls.
  7831.  ->        %SY        Allow alarm sounds
  7832.  ->        %SN        No alarm sounds (though alarm will delay)
  7833.  ->        %ST"nn"         Set delay for alarm (value in seconds)
  7834.  ->    %T"str"         Transmit string
  7835.  ->    %Us        Miscellaneous:    implemented as applicable
  7836.  ->        %U1        Clear screen
  7837.  *        %U2        Send CR as CR: unimplemented
  7838.  *        %U3        Send CR as CR/LF: unimplemented
  7839.  ->        %U4        Set full duplex (echoplex)
  7840.  ->        %U5        Set half duplex
  7841.  ->        %U6        Send Break signal
  7842.  *        %U7        Set line wrap on: unimplemented
  7843.  *        %U8        Set line wrap off: unimplemented
  7844.  *        %U9        Set Scroll on: unimplemented
  7845.  *        %U0        Set Scroll off: unimplemented
  7846.  ->    %Vs        Miscellaneous:    VCO specific subcommands
  7847.  *        %V0        Unimplemented (PC-VCO used for Voice)
  7848.  *        %V1        Unimplemented (PC-VCO used for Voice)
  7849.  *        %V2        Unimplemented (PC-VCO used for Voice)
  7850.         %V3        Blank line suppression on (Alt-G)
  7851.         %V4        Blank line suppression off (Alt-G)
  7852.         %V5        High bit masking on (Alt-Z)
  7853.         %V6        High bit masking off (Alt-Z)
  7854.         %V7        Chat mode on (Alt-A)
  7855.         %V8        Chat mode off (Alt-A)
  7856.         %V9        WXMODEM send allowed (not used now)
  7857.         %VA        WXMODEM send not allowed (not used now)
  7858.         %VB        WXMODEM receive allowed (not used now)
  7859.         %VC        WXMODEM receive not allowed (not used now)
  7860.         %VD"File_Name"  Unimplemented (PC-VCO FLB fname)
  7861.         %VE"File_Name"  Unimplemented (PC-VCO EXC fname)
  7862.  
  7863.  
  7864. Version 2.7: 901015                           Appendices
  7865.  
  7866. COM-AND: IBM PC Communication Script Language                 Page 139
  7867.  
  7868.  
  7869. M.    Script Language (Version 1.x, continued)
  7870.  
  7871.  
  7872.  ->    %Vs (continued)
  7873.  *        %VF        Unimplemented (PC-VCO use PLINK/CIS)
  7874.  *        %VG        Unimplemented (PC-VCO use GEnie/Delphi)
  7875.  ->    %W"nn"          Wait for a specified # seconds
  7876.  ->    %Xs        XMODEM receive/send
  7877.  ->        %XR"File_Name"
  7878.  ->        %XS"File_Name"
  7879.  ->    %Ys        ASCII Send
  7880.  *        %YP"nn"         Set pacing: unimplemented
  7881.  ->        %YT"File_name"  Transmit file_name using ASCII send
  7882.         %Y0"str"        Set host prompt character
  7883.         %Y1        Turn off host prompt character
  7884.         %Y2        Transmit linefeeds on
  7885.         %Y3        Transmit linefeeds off
  7886.         %Y4        Tab expansion on
  7887.         %Y5        Tab expansion off
  7888.         %Y6"nn"         Set intercharacter delay (in milliseconds)
  7889.  ->    %Zs        Translate tables:  unimplemented.
  7890.  *        %ZY        Translate table on:  unimplemented
  7891.  *        %ZN        Translate table off:  unimplemented
  7892.  
  7893.     Multiple 1.x commands may be placed on a single line.  SYNTAX errors
  7894.     are reported.  On 'end-of-file', COM-AND returns to the normal
  7895.     interactive mode (unless %Q was specified in the script).
  7896.     --------------------------------------------------------------------
  7897.     The notation '->' to the left of a script command indicates that it
  7898.     IS a part of the PROCOMM script language.  Unmarked extensions were
  7899.     added for COM-AND, to provide its features to script file users.
  7900.     --------------------------------------------------------------------
  7901.     The notation '*' to the left of a script command indicates that
  7902.     it is unimplemented (but will be accepted).  Commands marked 'unim-
  7903.     plemented' are parsed and accepted by COM-AND, but not executed.
  7904.  
  7905.  
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919. Version 2.7: 901015                           Appendices
  7920.  
  7921. COM-AND: IBM PC Communication Script Language                 Page 140
  7922.  
  7923.  
  7924. N.    Language Summary
  7925.  
  7926.  
  7927.     Version 2.1 of COM-AND included a script processor that performed
  7928.     scripts written for PROCOMM 2.4.2 and also extended the script
  7929.     language considerably (substring extraction, concatenation, ...).
  7930.     When PROCOMM Plus was released, COM-AND's script language was again
  7931.     extended, to include ASPECT as a subset, and also to add functions
  7932.     requested by COM-AND users.  The resulting language syntax is
  7933.     summarized below.
  7934.  
  7935.  
  7936.     Between COM-AND 2.1 and COM-AND 2.2 a certain few instructions and
  7937.     usages did change, most notably the indexing of substrings.  COM-AND
  7938.     2.1 numbered characters in substrings from 1.  ASPECT added substring
  7939.     functions, but numbered characters from 0.  This author could not
  7940.     release a script language that contained both usages, and defered to
  7941.     PCPlus.  For any inconvenience to COM-AND users, I apologize.
  7942.  
  7943.  
  7944.  
  7945.  
  7946.  
  7947.     -----------------------------------------------------------------
  7948.     The notation '->' to the left of a script command below indicates
  7949.     that it IS compatible with the ASPECT script language.
  7950.  
  7951.     -----------------------------------------------------------------
  7952.     The notation '*' to the left of a script command indicates that it
  7953.     is unimplemented (but will be accepted).  Commands marked 'unim-
  7954.     plemented' are parsed and accepted by COM-AND.  SYNTAX errors in
  7955.     command formation are not necessarily reported.
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.  
  7965.  
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974. Version 2.7: 901015                           Appendices
  7975.  
  7976. COM-AND: IBM PC Communication Script Language                 Page 141
  7977.  
  7978.  
  7979. N.    Language Summary (continued)
  7980.  
  7981.  
  7982.   Page     Syntax              Comment
  7983.   ------ ------------------------------- -----------------------------
  7984.   11:     ACCESSORY <string>         ; Accessory directory entry # 1-50
  7985.   11: -> ADD Nx Ny Nz             ; Nz = Nx+Ny
  7986.   12: -> ALARM [<number>]         ; Time in seconds
  7987.   12:     ALOAD <string>          ; Load accessory directory
  7988.   12:     ALLOCATE <number>         ; Allocate up to 100 variables
  7989.   12:     ANAME Sx <number>         ; Acc Dir entry name
  7990.   13:     APGM Sx <number>         ; Acc Dir program invocation
  7991.   13:     ASCRIPT Sx <number>         ; Acc Dir script invocation
  7992.   13: -> ASSIGN Sx <string>         ; Set a value into Sx
  7993.   13:     ASUBDIR Sx <number>         ; Acc Dir subdirectory field
  7994.   13: -> ATGET row col attr len Sx     ; GET performed with positioning
  7995.   14: -> ATOI Sx Nx             ; Convert a str variable to num
  7996.   14: -> ATSAY row col attr <string>     ; MESSAGE performed with positioning
  7997.   14:     ATSCR row col len Sx         ; Read screen at location for len
  7998.   14: -> BOX row col row col attr     ; Draw a box (clear within)
  7999.   15: -> BREAK [<number>]         ; Time in milliseconds
  8000.   15: -> BYE                 ; Exit script and pgm - leave DTR
  8001.   15: -> CASE (<string>!<number>)     ; Within SWITCH/ENDSWITCH
  8002.   15: -> CHDIR <string>          ; Change d:\path
  8003.   16: -> CLEAR <attr>             ; Clear screen
  8004.   16:     CLOG OPEN <string>         ; Open call-logging file by name
  8005.   16:     CLOG CLOSE             ; Close call-logging
  8006.   16:     CLOG <string>             ; Write to call-log if open
  8007.   17:     COLOR <attr>             ; Set screen text color
  8008.   17:     COMBASE <port> Nx         ; Get base addr of COMx
  8009.   17:     COMPARMS Sx             ; Return current comm parm settings
  8010.   17:     COMVECTOR <port> Nx         ; Get vector # for COMx
  8011.   18:     CONCAT Sx [(##)!*] <string>     ; Concatenate text to Sx [at col ##]
  8012.   18: -> CONNECT             ; Exit script
  8013.   18:     CRC <string> Nx         ; Compute buffer CRC
  8014.   19:     CTOI Sx Nx             ; Character to value conversion
  8015.   19: -> CUROFF              ; Turn off cursor (EXIT turns on)
  8016.   19: -> CURON                 ; Turn on cursor (if off)
  8017.   19: -> CURSOR Nx Ny             ; Read cursor (nx=row,ny=col)
  8018.   19: -> CWHEN [(#)]             ; # = 0,1,2,...9
  8019.   20: -> DATE Sx (0!1)             ; System date
  8020.   20:     DBOX row col row col attr     ; Double line box (clear within)
  8021.   20:     DEALLOCATE             ; Deallocate dynamic variables
  8022.   20: -> DEC Nx              ; Decrement a numeric variables
  8023.   21:     DECRYPT <string><string><string>; Decrypt a file to a file using psw
  8024.   21: -> DEFAULT             ; Within SWITCH/ENDSWITCH
  8025.  
  8026.  
  8027.  
  8028.  
  8029. Version 2.7: 901015                           Appendices
  8030.  
  8031. COM-AND: IBM PC Communication Script Language                 Page 142
  8032.  
  8033.  
  8034. N.    Language Summary (continued)
  8035.  
  8036.  
  8037.   Page     Syntax              Comment
  8038.   ------ ------------------------------- -----------------------------
  8039.   21:     DEFTIME <number>         ; WAITFOR, etc in seconds
  8040.   21:     DELETE <string>         ; Delete a file by name (SUCCESS)
  8041.   22: -> DIAL <string>             ; Dialing directory entry # 1-100
  8042.   22: -> DIR <string>             ; Perform Alt-F directory function
  8043.   22:     DIRECTORY Sx [<number>]     ; Return dialing entry name
  8044.   23: -> DIV Nx Ny Nz             ; Nz = Nx/Ny
  8045.   23:     DLDIR Sx             ; Read current download d:subdir
  8046.   23:     DLOAD <string>          ; File name argument
  8047.   23:     DNUMBER Sx [<number>]         ; Return dialing entry number
  8048.   24:     DO                 ; Begin a DO-Loop clause (see UNTIL)
  8049.  
  8050.         DO ; Start loop here        ; Example
  8051.         ...                 ; Example
  8052.         UNTIL <condition>            ; Example
  8053.  
  8054.   25: -> DOS <string> [WAIT]         ; Perform a DOS command
  8055.   25:     DPARMS Sx [<number>]         ; Return dialing entry parms
  8056.   25:     DSCRIPT Sx [<number>]         ; Return dialing entry script
  8057.   26:     DWINDOW row,col,row,col     ; Set scrolling region
  8058.   26:     DWINDOW CLEAR             ; Reset scrolling region to original
  8059.   26:     EBL Sx <EBL var>         ; Access EBL global (%A-%O, &...)
  8060.   27:     EBLSET &<name> Sx         ; Set EBL extended variable
  8061.   27: -> ELSE                 ; Within IF/ENDIF
  8062.   27:     ELSE statement          ; ENDIF not required this form
  8063.   27: -> EMULATE (TTY!ANSI!VIDTEX!VT100!VT52)
  8064.   28:     ENCRYPT <string><string><string> [DES!SIM!AUT] ; Encrypt a file
  8065.   15: -> ENDCASE             ; Terminates CASE or DEFAULT clause
  8066.   35:     ENDFOR              ; Terminates a FOR Loop
  8067.   44: -> ENDIF                 ; Terminates an IF clause
  8068.   75: -> ENDSWITCH             ; Terminates a SWITCH clause
  8069.   81:     ENDWHILE             ; Terminates a WHILE clause
  8070.   28:     ENVIRON Sx <string>         ; Return environment variable value
  8071.   29: -> EXECUTE <string>         ; Chain to new script
  8072.   29: -> EXIT                 ; Terminate script
  8073.   29: -> FATSAY row col attr <fmtstr> <parms> ; Fmttd MESS performed with pos
  8074.   30:     FATTR Sx <file>         ; File attribute, binary, (SUCCESS)
  8075.   31:     FCALL <file>             ; CALL a file as a subroutine
  8076.   32: -> FCLOSEI             ; Close input file
  8077.   32: -> FCLOSEO             ; Close output file
  8078.   32:     FDATE Sx <file> [0!1]         ; Date last modified (SUCCESS flag)
  8079.   32:     FFIRST Sx             ; Initialize wildcard (SUCCESS flag)
  8080.  
  8081.  
  8082.  
  8083.  
  8084. Version 2.7: 901015                           Appendices
  8085.  
  8086. COM-AND: IBM PC Communication Script Language                 Page 143
  8087.  
  8088.  
  8089. N.    Language Summary (continued)
  8090.  
  8091.  
  8092.   Page     Syntax              Comment
  8093.   ------ ------------------------------- -----------------------------
  8094.   33: -> FGETC Sx             ; Read a character
  8095.   33: -> FGETS Sx             ; Read a record
  8096.   33: -> FIND Sx <string> [Nx]         ; Test for index in Sx
  8097.   34:     FNEXT    Sx [QUAL]         ; Next file after FFIRST (SUCCESS)
  8098.   34: -> FOPENI Sx [TEXT!BINARY]     ; Open a file for input
  8099.   34: -> FOPENO Sx [TEXT!BINARY!APPEND]  ; Open a file for output
  8100.   35:     FOR Nx = <val> <val> [<val>]     ; FOR Loop (init,final,step)
  8101.  
  8102.         FOR Nx = <val> <val> [<val>]    ; Example
  8103.         ...                ; Example
  8104.         ENDFOR                ; Example
  8105.  
  8106.   36: -> FPUTC Sx             ; Read a character
  8107.   36: -> FPUTS Sx             ; Read a record
  8108.   36: -> FREAD Sx Nx Ny          ; Read a record (Nx may be literal)
  8109.   37:     FREE  Sx <string>         ; Get available space on <disc>
  8110.   37:     FRESTORE[I!O]             ; Restore position from last FSAV
  8111.   37:     FRETURN             ; RETURN from an FCALL
  8112.   38:     FSAVE[I!O]             ; Save input/output file position
  8113.   38:     FSAVE[I!O] CLEAR         ; Clear stack of saved positions
  8114.   38:     FSAVE[I!O] SHIFT         ; Shift stack of saved pos down 1
  8115.   38:     FSAVE[I!O] POP          ; Throw away last saved position
  8116.   38:     FSIZE Sx <file>         ; File size, 7 digits, (SUCCESS)
  8117.   38:     FTIME Sx <file> [0!1]         ; Time last modified (SUCCESS flag)
  8118.   39: -> FWRITE Sx Nx             ; Write a record (Nx may be literal)
  8119.   39: -> GET Sx [<number>]         ; <number> = maximum length
  8120.   40: -> GETFILE ASCII      <string>     ; A.K.A. Buffer capture
  8121.   40: -> GETFILE BYMODEM         ; Batch YMODEM (True ... (TM))
  8122.   40: -> GETFILE BYMODEMG         ; Streaming YMODEM (batch)
  8123.   40: -> GETFILE CISB             ; CompuServe B-protocol
  8124.   40: -> GETFILE KERMIT          ; Kermit or SuperKermit
  8125.   40:     GETFILE QUICKB          ; CompuServe Quick B-protocol
  8126.   40: -> GETFILE RXMODEM  <string>     ; Relaxed CRC or Checksum XMODEM
  8127.   40: -> GETFILE WXMODEM  <string>     ; Windowed XMODEM
  8128.   40: -> GETFILE XMODEM   <string>     ; CRC or Checksum XMODEM
  8129.   40: -> GETFILE YMODEM   <string>     ; Simple YMODEM (not True ... (TM))
  8130.   40:     GETFILE ZMODEM          ; ZMODEM (batch)
  8131.   41: -> GOSUB <string>          ; Call a subroutine (and return)
  8132.   42: -> GOTO <string>             ; Branch (not into IF or SWITCH)
  8133.   43: -> HANGUP              ; Disconnect call
  8134.       *  HELP                 ; Help processor (unimplemented)
  8135.       *  HOST                 ; Host mode (unimplemented)
  8136.  
  8137.  
  8138.  
  8139. Version 2.7: 901015                           Appendices
  8140.  
  8141. COM-AND: IBM PC Communication Script Language                 Page 144
  8142.  
  8143.  
  8144. N.    Language Summary (continued)
  8145.  
  8146.  
  8147.   Page     Syntax              Comment
  8148.   ------ ------------------------------- -----------------------------
  8149.   44:     IF [NOT] ALPHA Sx         ; Test for alpha char
  8150.   44:     IF [NOT] ALLOCATED         ; Test for dynamic variables
  8151.   44: -> IF [NOT] CONNECTED         ; Test modem carrier (CD)
  8152.   44:     IF [NOT] CONTROL Sx         ; Test for control char
  8153.   44: -> IF [NOT] EOF             ; Test for EOF on input file
  8154.   44:     IF [NOT] ERROR          ; Test last instruction
  8155.   44: -> IF [NOT] FAILURE         ; .. NOT SUCCESS
  8156.   44:     IF [NOT] FCALLED         ; Test for FCALL return required
  8157.   44:     IF [NOT] FKEY             ; Test for ftn key pending
  8158.   44:     IF [NOT] FLAG [(#)]         ; Test flag variable
  8159.   44:     IF [NOT] FCALLED         ; Test for FCALL of script
  8160.   44:     IF [NOT] FIND Sx Sy [Nx]     ; Test for Sx .within. Sy
  8161.   44: -> IF [NOT] FOUND          ; Test last FIND statement
  8162.   44:     IF [NOT] FULL             ; Test if we have XOFFed host
  8163.   44: -> IF [NOT] HITKEY         ; Test for keypress pending
  8164.   44:     IF [NOT] ISDLFILE Sx         ; Test for file presence
  8165.   44: -> IF [NOT] ISFILE Sx         ; Test for file presence
  8166.   44:     IF [NOT] ISSCFILE Sx         ; Test for file presence
  8167.   44: -> IF [NOT] LINKED         ; If script executed from dialing
  8168.   44: -> IF [NOT] MONO             ; Test for monochrome adapter
  8169.   44:     IF [NOT] NULL Sx         ; Test for Sx blank or null
  8170.   44:     IF [NOT] NUMERIC Sx         ; Test for numeric character
  8171.   44:     IF [NOT] OVERLAY         ; Test for overlay loaded
  8172.   44:     IF [NOT] PRINTER         ; Test for PRINTER ON
  8173.   44:     IF [NOT] RECEIVE         ; Test for comm chars pending
  8174.   44:     IF [NOT] SPECIAL Sx         ; Test for special character
  8175.   44:     IF [NOT] STRCMP Sx Sy         ; Test Sx = Sy
  8176.   44: -> IF [NOT] SUCCESS         ; Test last statement
  8177.   44:     IF [NOT] TRACE          ; Test for tracing
  8178.   44: -> IF [NOT] WAITFOR         ; Test last WAITFOR statement
  8179.   44:     IF [NOT] XOFF             ; Test for XOFF condition
  8180.   44: -> IF [NOT] ZERO Nx         ; Test for Nx = 0
  8181.   44: -> IF [NOT] GT!LT!GE!LE!EQ Nx Ny     ; Test for Nx .condition. Ny
  8182.   44:     IF [NOT] NE Nx Ny         ; Test for not equal
  8183.   44:     IF [NOT] Nx GT!LT!GE!LE!EQ Ny     ; Test for Nx .condition. Ny
  8184.  
  8185.         Usual form        Alternative form     Alternative form
  8186.       -------------------+--------------------+----------------------
  8187.       ->    IF condition |  IF condition stmt |  IF condition
  8188.           [stmts]     |              |     [stmts]
  8189.       ->    ELSE     |              |  ELSE statement
  8190.           [stmts]     |              |
  8191.       ->    ENDIF     | (not ASPECT form)  | (not ASPECT form)
  8192.  
  8193.  
  8194. Version 2.7: 901015                           Appendices
  8195.  
  8196. COM-AND: IBM PC Communication Script Language                 Page 145
  8197.  
  8198.  
  8199. N.    Language Summary (continued)
  8200.  
  8201.  
  8202.   Page     Syntax              Comment
  8203.   ------ ------------------------------- -----------------------------
  8204.   49: -> INC Nx              ; Increment a numeric var
  8205.   49: -> INIT Nx <number>         ; Initialize a numeric variable
  8206.   50:     INPUT Nx <address>         ; Machine level INPUT
  8207.   50:     ISDLFILE <string>         ; Test for presence of a dload file
  8208.   50: -> ISFILE <string>         ; Test for presence of a file
  8209.   51:     ISSCFILE <string>         ; Test for presence of a script file
  8210.   51: -> ITOA Nx Sx             ; Numeric to string conversion
  8211.   51:     ITOC Nx Sx             ; Value to character conversion
  8212.       *  KERMSERV FINISH         ; Unimplemented
  8213.       *  KERMSERV GETFILE         ; Unimplemented
  8214.       *  KERMSERV LOGOUT         ; Unimplemented
  8215.       *  KERMSERV SENDFILE         ; Unimplemented
  8216.   52: -> KEYGET Sx             ; Read ('a', esc='1b', F1='3b00')
  8217.   52: -> KFLUSH              ; Flush keyboard buffer
  8218.   52:     LD Sx <number>          ; Return long dist string 1,2,3,4
  8219.   52:     LEGEND <string>         ; Text for status line
  8220.   53:     LENGTH Sx Nx             ; Compute length of string
  8221.   53:     LJ Sx                 ; Left justify string variable
  8222.   53:     LOAD (DIAL!MACR!ACCE!DEFA!ALLOC) [parms] ; Load file data
  8223.   53: -> LOCATE <number> <number>     ; Position cursor <row> <col>
  8224.   54: -> LOG OPEN <string>         ; Open disk/PRN logging
  8225.   54: -> LOG CLOSE             ; Close disk/PRN logging
  8226.   54: -> LOG SUSPEND             ; Suspend disk/PRN logging
  8227.   54: -> LOG RESUME             ; Resume disk/PRN logging
  8228.   54:     LOG MARKED (ON!OFF)         ; Set/reset log timestamping
  8229.   54:     LOWER Sx             ; Lower case contents of Sx
  8230.   54: -> MACRO <num> [Sx]         ; <num> = 0-9, Sx optional
  8231.   55:     MANUAL <number>         ; Invoke an interactive window
  8232.   55: -> MATGET row col attr len Sx     ; MGET performed with positioning
  8233.   55: -> MDIAL <string>          ; Dial number in Sx manually
  8234.   56:     MDIR <string>             ; Create a subdirectory
  8235.   56: -> MESSAGE <string>         ; Write text to local console
  8236.   56: -> MGET Sx <number>         ; <number> = max length
  8237.   56: -> MLOAD <string>          ; File name argument
  8238.   57:     MSR Nx              ; Read the modem status register
  8239.   57: -> MUL Nx Ny Nz             ; Nz = Nx*Ny
  8240.   58:     Nx = expression         ; Compute a value and assign it
  8241.   59:     OUTPUT <address> Nx         ; Machine level OUTPUT
  8242.   59:     ON ESCAPE GOSUB <label>     ; Action on operator escape
  8243.   59:     ON ESCAPE CLEAR         ; Clear set action
  8244.   59:     ON SILENCE GOSUB <label>     ; Action on receive timeout
  8245.   59:     ON SILENCE CLEAR         ; Clear set action
  8246.  
  8247.  
  8248.  
  8249. Version 2.7: 901015                           Appendices
  8250.  
  8251. COM-AND: IBM PC Communication Script Language                 Page 146
  8252.  
  8253.  
  8254. N.    Language Summary (continued)
  8255.  
  8256.  
  8257.   Page     Syntax              Comment
  8258.   ------ ------------------------------- -----------------------------
  8259.   60:     OVERLAY <file>          ; Load .EXE or .COM overlay
  8260.   60:     OVERLAY CLEAR             ; Release overlay area
  8261.   61: -> PAUSE [<number>]         ; Time in seconds
  8262.   61:     PERFORM <string>         ; Perform string as command
  8263.   61:     PLAY <string>             ; Play a music string
  8264.   61:     PRESERVE Sx             ; Modify to avoid edits
  8265.   62: -> PRINTER (ON!OFF)         ; Turn printer copy on/off
  8266.   62:     PRINT <string>          ; Send <string> to LP1 printer
  8267.   62: -> QUIT                 ; Terminate script
  8268.   63:     RDIR <string>             ; Remove a subdirectory
  8269.   63:     READ Sx Nx Ny             ; Read a record (Nx may be literal)
  8270.   63:     RENAME Sx Sy             ; Rename a file by name (SUCCESS)
  8271.   64:     RESET                 ; Restore dfts to load-time values
  8272.   64:     RESTORE             ; Restore last saved area on screen
  8273.   64: -> RETURN              ; Return from GOSUB
  8274.   64:     REWIND              ; Rewind input (SUCCESS)
  8275.   64: -> RFLUSH              ; FLush receive buffer
  8276.   65: -> RGET Sx [<number> [<number>]]     ; <length> <delay in seconds>
  8277.   65:     RND <modulus> Nx         ; Return random number
  8278.   65:     RJ Sx                 ; Right justify string variable
  8279.   66: -> RUN <string> [WAIT]         ; Load and execute a program
  8280.   66:     SAVE row col row col         ; Save an area on the screen
  8281.   66:     SCALL <addr> [parms[,parms]]     ; Call an overlay procedure
  8282.   67: -> SCROLL cnt row col row col attr ; Scroll a region on the screen
  8283.   67:     SCREEN row col row col attr Sx  ; Multiline screen display
  8284.   68: -> SENDFILE ASCII     <string>     ; A.K.A. Buffer capture
  8285.   68: -> SENDFILE BYMODEM   <string>     ; Batch YMODEM (True ... (TM))
  8286.   68: -> SENDFILE BYMODEMG  <string>     ; Streaming YMODEM (batch)
  8287.   68: -> SENDFILE CISB             ; CompuServe B-protocol
  8288.   68: -> SENDFILE KERMIT    <string>     ; Kermit or SuperKermit
  8289.   68:     SENDFILE QUICKB         ; CompuServe Quick B-protocol
  8290.   68: -> SENDFILE RXMODEM   <string>     ; Relaxed CRC or Checksum XMODEM
  8291.   68: -> SENDFILE WXMODEM   <string>     ; Windowed XMODEM
  8292.   68: -> SENDFILE XMODEM    <string>     ; CRC or Checksum XMODEM
  8293.   68: -> SENDFILE YMODEM    <string>     ; Simple YMODEM (not True ... (TM))
  8294.   68:     SENDFILE ZMODEM    <string>     ; ZMODEM transfer (batch)
  8295.   84: -> SET <subcommand>         ; See below
  8296.   68: -> SHELL                 ; SHELL to DOS (must exit manually)
  8297.   69:     SNAME Sx             ; Name of current script file
  8298.       *  SNAPSHOT             ; Unimplemented
  8299.   69: -> SOUND Nx Ny             ; Sound frequency Nx for Ny msecs
  8300.   69:     SSIZE Nx             ; Return # screen lines
  8301.  
  8302.  
  8303.  
  8304. Version 2.7: 901015                           Appendices
  8305.  
  8306. COM-AND: IBM PC Communication Script Language                 Page 147
  8307.  
  8308.  
  8309. N.    Language Summary (continued)
  8310.  
  8311.  
  8312.   Page     Syntax              Comment
  8313.   ------ ------------------------------- -----------------------------
  8314.   70:     STACK <string>          ; Store <string> in BIOS kbd buffer
  8315.   70:     STACK CLEAR             ; Clear BIOS keyboard buffer
  8316.   70:     STORE (DIAL!MACR!ACCE!DEFA!ALLOC) [parms] ; Create new setting file
  8317.   71: -> STRCAT Sx Sy             ; Concatenate 2 strings
  8318.   71: -> STRCMP Sx Sy             ; Compare Sy to Sx (case sensitive)
  8319.   71: -> STRCPY Sx Sy             ; ASSIGN Sy to Sx
  8320.   72: -> STRFMT Sx <fmtstr> <parms>     ; Fmt Sx using <fmtstr> and <parm>
  8321.   73: -> SUB Nx Ny Nz             ; Nz = Nx-Ny
  8322.   73:     SUBDIR Sx             ; Set d:subdir into Sx
  8323.   73: -> SUBSTR Sx Sy <number> <number>  ; Take substr from Sy, place in Sx
  8324.   74:     SUSPEND FOR Nx Ny         ; Suspend for duration (h,m)
  8325.   74: -> SUSPEND UNTIL Nx Ny         ; Suspend until time (military fmt)
  8326.   75: -> SWITCH (Sx!Nx)          ; Variable to be tested
  8327.  
  8328.       ->    SWITCH (Sx!Nx)            ; Variable to be tested
  8329.       ->       CASE (<string>!<number>)     ; Match Sx and <string>
  8330.            ...                ; .. Execute if they match
  8331.       ->       ENDCASE                ; Each case must have an ENDCASE
  8332.       ->       CASE <string>            ; <String> = "_NULL" -> empty
  8333.            ...
  8334.       ->       ENDCASE                ; End of second case
  8335.            ...
  8336.       ->       DEFAULT                ; DEFAULT executed if no case
  8337.            ...                ; .. above matched
  8338.       ->       ENDCASE                ; End of DEFAULT case, too
  8339.       ->    ENDSWITCH                ; End of SWITCH domain
  8340.  
  8341.   76:     Sx(m:n) = expression         ; Concatenate strings and assign
  8342.   76: -> TERMINAL             ; Exit script
  8343.   77: -> TIME Sx [0!1]             ; System time (1 -> military fmt)
  8344.   77: -> TRACE (ON!OFF)          ; Script tracing
  8345.   77: -> TRANSMIT <string>         ; Send exactly <string>
  8346.   77:     TSINCE [(#)] Nx Ny Nz         ; Read time since timer (#) in h,m,s
  8347.   78: -> TYPE <string>             ; Display contents of a file (Alt-W)
  8348.   78:     UNTIL <condition as IF>     ; Terminates a DO-Loop
  8349.   78:     UPDATE              ; Update dft file
  8350.   78:     UPPER Sx             ; Upper case contents of Sx
  8351.   78:     VERSION Nx             ; Read COM-AND VERSION #
  8352.   79: -> WAITFOR <string> [<number>]     ; Optional time in seconds
  8353.   79:     WCLOSE              ; Close an open window
  8354.   80: -> WHEN [(#)] <string> <string>     ; <target> <response>
  8355.  
  8356.  
  8357.  
  8358.  
  8359. Version 2.7: 901015                           Appendices
  8360.  
  8361. COM-AND: IBM PC Communication Script Language                 Page 148
  8362.  
  8363.  
  8364. N.    Language Summary (continued)
  8365.  
  8366.  
  8367.   Page     Syntax              Comment
  8368.   ------ ------------------------------- -----------------------------
  8369.   81:     WHILE <condition>         ; Begins a conditional loop if true
  8370.  
  8371.         WHILE <condition>            ; Example
  8372.            ...                ; Example
  8373.            ENDWHILE             ; Example
  8374.  
  8375.   82:     WOPEN row col row col attr [label] ; Open window (label optional)
  8376.   83:     WRITE Sx [Nx]             ; Write a record (Nx optional)
  8377.  
  8378.   84:     SET 25              ; CGA/Mono
  8379.   84:     SET 43              ; EGA mode
  8380.   84:     SET ACCE NAME # <string>     ; Acc Dir entry name field
  8381.   84:     SET ACCE SUBD # <string>     ; Acc Dir entry subdir field
  8382.   84:     SET ACCE PGM  # <string>     ; Acc Dir entry pgm field
  8383.   84:     SET ACCE SCRI # <string>     ; Acc Dir entry script field
  8384.   84:     SET ADVERT (ON!OFF)         ; Set initial advert on/off
  8385.   84: -> SET ALARM (ON!OFF)         ; Disable alarm sound (see ATIME)
  8386.   84:     SET ANYWHEN (ON!OFF)         ; WHEN exact (off), or substr (on)
  8387.   98: -> SET ASCII <subcommand>      ; See below
  8388.   84: -> SET ATIME <number>         ; Alarm time in seconds
  8389.   84: -> SET BACKSPACE IN (NONDEST!DEST) ; Bkspace function when rcv'd
  8390.   84: -> SET BACKSPACE OUT (BACK!DELETE) ; Bkspace function when sent
  8391.   84:     SET BAR <attr>          ; Set status line color
  8392.   84: -> SET BAUDRATE (300!1200!2400!4800!9600!19K!38K!56K!115K)
  8393.   84:     SET BELL #             ; Set bell tone in Hz
  8394.   84:     SET BKSCREEN #          ; Backscreen size 0-64
  8395.   84: -> SET BREAK <number>         ; Time in milliseconds
  8396.   84:     SET BSUPPRESS (ON!OFF)      ; Blank line suppression
  8397.   84:     SET CALLLOG (ON!OFF)         ; Set/reset call logging
  8398.   84:     SET CDISPLAY (ON!OFF)         ; Control character display
  8399.   84:     SET CDRESPECT (ON!OFF)      ; Set/reset CD respect
  8400.   84:     SET CHAT (ON!OFF)         ; Chat mode
  8401.   84:     SET CHLINES #             ; Specify chat window size
  8402.   84:     SET CLOCK (ON!OFF!NEW)      ; Screen clock (new -> reset time)
  8403.   84:     SET COLOR (ON!OFF)         ; Set/reset color screen
  8404.   84:     SET COMBASE <port> Nx         ; Specify base address COMx
  8405.   84:     SET COMVECTOR <port> Nx     ; Specify vector # COMx
  8406.   84: -> SET CR     (CR!CR_LF)         ; CR received as CR or CR/LF
  8407.   84: -> SET CR_IN  (CR!CR_LF)         ; CR received as CR or CR/LF
  8408.       *  SET CR_OUT (CR!CR_LF)         ; Unimplemented
  8409.   84: -> SET DATABITS (7!8)         ; Set comm parm
  8410.  
  8411.  
  8412.  
  8413.  
  8414. Version 2.7: 901015                           Appendices
  8415.  
  8416. COM-AND: IBM PC Communication Script Language                 Page 149
  8417.  
  8418.  
  8419. N.    Language Summary (continued)
  8420.  
  8421.  
  8422.   Page     Syntax              Comment
  8423.   ------ ------------------------------- -----------------------------
  8424.   84:     SET DEFAULT <attr>         ; Set menu window color
  8425.   84:     SET DBLCLICK #          ; Dbl click interval in MS
  8426.   84:     SET DIAL NAME # <string>     ; Dial dir entry name field
  8427.   84:     SET DIAL NUMB # <string>     ; Dial dir entry number field
  8428.   84:     SET DIAL RATE # <string>     ; Dial dir entry rate field
  8429.   84:     SET DIAL PARI # <string>     ; Dial dir entry parity field
  8430.   84:     SET DIAL DATA # <string>     ; Dial dir entry dbits field
  8431.   84:     SET DIAL STOP # <string>     ; Dial dir entry stop field
  8432.   84:     SET DIAL SCRI # <string>     ; Dial dir entry script field
  8433.   84: -> SET DISPLAY (ON!OFF)         ; PC+ 1.1 SET RDISP equivalent
  8434.   84: -> SET DLDIR <string>         ; Set d:\path for downloads
  8435.   84:     SET DOSLEVEL <number>         ; Set pgm error level for batches
  8436.   84:     SET DPREFIX <string>         ; Specify dialing prefix
  8437.   84:     SET DROPDTR (ON!OFF)         ; Set hangup method
  8438.   84:     SET DSUFFIX <string>         ; Specify dialing suffix
  8439.   84:     SET DTR (ON!OFF)         ; Raise/lower DTR to modem
  8440.   84: -> SET DUPLEX (HALF!FULL)      ; Keyboard echo
  8441.       *  SET ENQ ON             ; Unimplemented
  8442.   84:     SET ENQ (OFF!CISB)         ; Automatic CIS file up/dn, VIDTEX
  8443.   84:     SET EXIT <scriptname>         ; Script on Alt-X, BYE
  8444.   84:     SET EXQUery (ON!OFF)         ; Set exit query flag
  8445.   84:     SET FAILURE (ON!OFF)         ; Set/reset FAILURE flag (IF test)
  8446.   84:     SET FLAG [(#)] (ON!OFF)     ; Set/reset flags
  8447.   84: -> SET FLOWCTRL (ON!OFF)         ; XON/XOFF flow control
  8448.   84:     SET FOUND (ON!OFF)         ; Set/reset FOUND flag (IF test)
  8449.   84: -> SET HARDFLOW (ON!OFF)         ; RTS/CTS discipline
  8450.   84:     SET HMOUSE #             ; Set mouse horiz sensitivity
  8451.       *  SET HOSTPSWD <string>         ; Unimplemented
  8452.   84:     SET INAFTER (ON!OFF)         ; Set init modem after hangup
  8453.   84:     SET KBDBUFFER (ON!OFF)      ; Keyboard display buffer
  8454.   99: -> SET KERMIT <subcommand>     ; See below
  8455.   84:     SET LD # <string>         ; LD dir entry (1-4)
  8456.   84:     SET LINKED (ON!OFF)         ; Set/reset LINKED flag (IF test)
  8457.   84:     SET MACRO # <string>         ; Macro dir entry (0-9)
  8458.   84:     SET MASK (ON!OFF)         ; 7/8 bit masking
  8459.   84:     SET MCONNECT <string>         ; Specify modem connect string
  8460.   84:     SET MDCHar <value>         ; Set modem delay char ASCII value
  8461.   84:     SET MDELAY #             ; Specify intercharacter delay
  8462.       -> SET MENUMODE (ON!OFF)         ; Turn on/off menu mode
  8463.   84:     SET MESCAPE <string>         ; Specify modem escape string
  8464.   84:     SET MHANGUP <string>         ; Specify hangup string
  8465.  
  8466.  
  8467.  
  8468.  
  8469. Version 2.7: 901015                           Appendices
  8470.  
  8471. COM-AND: IBM PC Communication Script Language                 Page 150
  8472.  
  8473.  
  8474. N.    Language Summary (continued)
  8475.  
  8476.  
  8477.   Page     Syntax              Comment
  8478.   ------ ------------------------------- -----------------------------
  8479.   84:     SET MINIT <string>         ; Specify modem init string
  8480.   84:     SET MUSIC (ON!OFF)         ; Set/reset music escape sequences
  8481.   84: -> SET PARITY (EVEN!ODD!NONE)     ; Set comm parm
  8482.   84:     SET PCJR (ON!OFF)         ; Suspend comm during disk I/O
  8483.   84: -> SET PORT (COM1!COM2!COM3!COM4)  ; Set comm parm
  8484.   84:     SET QUIET (ON!OFF)         ; Suppress bells
  8485.   84: -> SET RDELAY <number>         ; Reconnect delay, in seconds
  8486.   84:     SET RDISPLAY (ON!OFF)         ; Receive character display
  8487.   84:     SET RDMAX <number>         ; Set redial limit count
  8488.   84:     SET RECHO (ON!OFF)         ; Received character echo (back out)
  8489.   84: -> SET REMOTE (ON!OFF)         ; Set/reset remote cmd processing
  8490.   84:     SET RLEOK (ON!OFF)         ; Allow/disallow RLE's
  8491.   84:     SET RMODE (ASCII!BINARY)     ; RGET implements BS/rubout
  8492.   84:     SET RTS (ON!OFF)         ; Set/reset modem RTS bit
  8493.   84:     SET RTSD (ON!OFF)         ; Set/reset modem RTS discipline
  8494.   84:     SET RTSF (ON!OFF)         ; Set/reset RTS flow control
  8495.       *  SET SCROLL (ON!OFF)         ; Unimplemented
  8496.       *  SET SHELLPSWD <string>      ; Unimplemented
  8497.   84:     SET SILENCE <seconds>         ; Set ON SILENCE duration
  8498.   84:     SET SLOWOUT (ON!OFF)         ; Set slow writes
  8499.   84: -> SET SOFTFLOW (ON!OFF)         ; XON/XOFF flow control
  8500.       *  SET SOUND (ON!OFF)         ; Unimplemented
  8501.   84: -> SET STOPBITS (1!2)         ; Comm parm
  8502.   84:     SET SUCCESS (ON!OFF)         ; Set/reset SUCCESS flag (IF test)
  8503.   84: -> SET SWRITE (BIOS!DIRECT!DOS)     ; Screen I/O update method
  8504.   84:     SET TEXT <attr>         ; Set text window color
  8505.   84:     SET TIMER [(#)]         ; Set timer number (#) to now
  8506.   84: -> SET TRANSLATE (ON!OFF)      ; Toggle translation
  8507.   84:     SET TTHRU (ON!OFF)         ; Set typethrough unconditionally
  8508.   84:     SET TUNE <string>         ; Set alarm tune using string
  8509.       *  SET TXPACE <number>         ; Implemented as SET ASCII CHARPACE
  8510.   84:     SET VMOUSE #             ; Set mouse vert sensitivity
  8511.   84:     SET WAITFOR (ON!OFF)         ; Set/reset WAITFOR flag
  8512.   84:     SET WATCHDOG <secs>         ; Set XOFF timeout in seconds
  8513.       *  SET WRAP (ON!OFF)         ; Unimplemented
  8514.   84:     SET XSUI <number>         ; Set xfer screen update interval
  8515.   101:     SET ZMODEM <subcommand>     ; See below
  8516.  
  8517.  
  8518.  
  8519.  
  8520.  
  8521.  
  8522.  
  8523.  
  8524. Version 2.7: 901015                           Appendices
  8525.  
  8526. COM-AND: IBM PC Communication Script Language                 Page 151
  8527.  
  8528.  
  8529. N.    Language Summary (continued)
  8530.  
  8531.  
  8532.   Page     Syntax              Comment
  8533.   ------ ------------------------------- -----------------------------
  8534.   98: -> SET ASCII BLANKEX (ON!OFF)     ; Blank line expansion ASCII send
  8535.   98: -> SET ASCII CHARPACE <number>     ; Time in MS between characters
  8536.       *  SET ASCII DN_CR (CR!CR_LF!STRIP); Unimplemented
  8537.       *  SET ASCII DN_LF (CR!CR_LF!STRIP); Unimplemented
  8538.   98: -> SET ASCII ECHO (ON!OFF)     ; Force Echo during SENDFILE ASCII
  8539.   98:     SET ASCII FLOW (ON!OFF)     ; ASCII send flow control used
  8540.   98: -> SET ASCII LINEPACE <number>     ; Delay between lines (1/10ths sec)
  8541.   98: -> SET ASCII PACECHAR <number>     ; Prompt from host (Decimal value)
  8542.   98:     SET ASCII QUIET (ON!OFF)     ; Disable alarm after SENDFILE ASCII
  8543.   98:     SET ASCII TABEX (ON!OFF)     ; Tab expansion ASCII send
  8544.       *  SET ASCII UP_CR (CR!CR_LF!STRIP); Unimplemented
  8545.   98: -> SET ASCII UP_LF (LF!CR_LF!STRIP); CR_LF unimplemented
  8546.   98:     SET ASCII UP_Z (STOP!SEND)     ; Terminate ASCII send on ctl-z
  8547.  
  8548.  
  8549.   99: -> SET KERMIT 8QUOTE <number>     ; Decimal ascii value
  8550.   99: -> SET KERMIT BLOCKCHECK (1!2!3)     ; Block check character length
  8551.   99: -> SET KERMIT CQUOTE <number>     ; Decimal ascii value
  8552.   99: -> SET KERMIT EOLCHAR <number>     ; Decimal ascii value
  8553.       *  SET KERMIT HANDSHAKE <number>     ; Decimal ascii value
  8554.       *  SET KERMIT FILETYPE (TEXT!BINARY); Unimplemented
  8555.   99:     SET KERMIT MARK <number>     ; Decimal ascii value
  8556.       *  SET KERMIT PACKSIZE <number>     ; Decimal ascii value
  8557.   99: -> SET KERMIT PADCHAR <number>     ; Decimal ascii value
  8558.   99: -> SET KERMIT PADNUM number     ; Number of pads
  8559.   99:     SET KERMIT REPEAT <number>     ; Decimal ascii value
  8560.   99:     SET KERMIT WINDOW <number>     ; Decimal ascii value
  8561.  
  8562.  
  8563.   101:     SET ZMODEM AUTO (ON!OFF)     ; Auto downloading
  8564.   101:     SET ZMODEM BLOCK <number>     ; Decimal ascii value
  8565.   101:     SET ZMODEM RECOVER (ON!OFF)     ; Download recovery
  8566.  
  8567.  
  8568.  
  8569.  
  8570.  
  8571.  
  8572.  
  8573.  
  8574.  
  8575.  
  8576.  
  8577.  
  8578.  
  8579. Version 2.7: 901015                           Appendices
  8580.